Global Variables in Trys?

Talk about anything Fraxy-related here. If you need help with Fraxy or the forums, you can ask here.
Post Reply
[][][][]
Fraxy God
Fraxy God
Posts: 1419
Joined: Thu Jan 21, 2010 12:33 pm
Epicness: Never enough.
Location: Philippines
Contact:

Global Variables in Trys?

Post by [][][][] »

Okay, so I'm making a Try (don't ask), and of course there's the main boss who uses Global Variables to 'signal' the Try to spawn a specific drone.

Problem is, how does someone set up the 'receiving' of Global Variables?
There was once something here,
but it's now gone.

[][][][]
Fraxy God
Fraxy God
Posts: 1419
Joined: Thu Jan 21, 2010 12:33 pm
Epicness: Never enough.
Location: Philippines
Contact:

Re: Global Variables in Trys?

Post by [][][][] »

... Fair enough.

But then loops wouldn't know if it's already in a different phase (drones only spawn in phase 1 of 4 or 5)...
Loops within a continuous environment that can do, though.

But still, any detection for global variables?
There was once something here,
but it's now gone.

[][][][]
Fraxy God
Fraxy God
Posts: 1419
Joined: Thu Jan 21, 2010 12:33 pm
Epicness: Never enough.
Location: Philippines
Contact:

Re: Global Variables in Trys?

Post by [][][][] »

Lol seriously though I was referring to the Try itself and the code to receive GVars.

and yes, I'm a total noob at Trys, so what
There was once something here,
but it's now gone.

[][][][]
Fraxy God
Fraxy God
Posts: 1419
Joined: Thu Jan 21, 2010 12:33 pm
Epicness: Never enough.
Location: Philippines
Contact:

Re: Global Variables in Trys?

Post by [][][][] »

okay, so I did.
But then it doesn't work.
Am I mislabeling the variable?
Or it can't detect changes made by the boss toward the variable?
Or something else?
There was once something here,
but it's now gone.

User avatar
AlexMdle
Administrator
Administrator
Posts: 1189
Joined: Mon Jan 18, 2010 8:36 pm
Epicness: micro skills

Re: Global Variables in Trys?

Post by AlexMdle »

fraxy supports parallel execution of code now.

Set it to trigger the variable on demand then reset it when done.
Now under new management.

Ex-Rumia
Elite Fraxian
Elite Fraxian
Posts: 631
Joined: Fri Feb 05, 2010 10:45 pm
Epicness: Getting there.
Gold Stars: 0
Location: Where I feel like being...mostly.

Re: Global Variables in Trys?

Post by Ex-Rumia »

Liiiiiiiiiiiiiiiiiike this!

"REPEAT", -1

"IF",_global1=1
_global1=0
"GETINFO",12,varID,varx
"GETINFO",13,varID,vary
"GETINFO",14,varID,varangle
"CREATE2","Testarea2/PlasmacasterR.fed", varangle, varx, vary, 100, 0
"GETINFO",12,varID2,varx2
"GETINFO",13,varID2,vary2
"GETINFO",14,varID2,varangle2
"CREATE2","Testarea2/PlasmacasterL.fed",varangle2, varx2, vary2, 100, 0
"ENDIF"

"LOOP"

It'll keep looking for the condition to activate the global var, then when it hits it, it will activate, it'll set that global variable back, do its thing, then keep going.
Formerly Haku1201.
Image
Image
Current Fraxy Projects:
F-Gradius
Project SH

Now known as a compulsive core abuser.

DC Universe Persona Names
Hero: Marietta Durge
Villian: Voivouire

[][][][]
Fraxy God
Fraxy God
Posts: 1419
Joined: Thu Jan 21, 2010 12:33 pm
Epicness: Never enough.
Location: Philippines
Contact:

Re: Global Variables in Trys?

Post by [][][][] »

Thanks, Rumia.
Triggers work... but how does one adjust drone spawn position with that code?
There was once something here,
but it's now gone.

Ex-Rumia
Elite Fraxian
Elite Fraxian
Posts: 631
Joined: Fri Feb 05, 2010 10:45 pm
Epicness: Getting there.
Gold Stars: 0
Location: Where I feel like being...mostly.

Re: Global Variables in Trys?

Post by Ex-Rumia »

Oh right, check out the readme try ENG version, I have that as part of a big core boss, so it would kinda only make sense if you saw the entire thing. Sorry.

Where the VarX is on the create area, you'd put your X Value there, same with Y and Angle. You can copy all of that, then delete all the Getinfo things and you'll have a Global variable trigger. Note, if you want other triggers, put them before the "Loop"
Formerly Haku1201.
Image
Image
Current Fraxy Projects:
F-Gradius
Project SH

Now known as a compulsive core abuser.

DC Universe Persona Names
Hero: Marietta Durge
Villian: Voivouire

Post Reply
Users browsing this forum: No registered users and 10 guests