Page 1 of 1
Global Code
Posted:
Sun Dec 28, 2003 10:58 am
by jazz_e_bob
How do I use this feature?
Posted:
Sun Dec 28, 2003 8:16 pm
by makslane
Use to create functions, arrays, structs to be used in your actions.
See the checkers demo, this have a lot of global code.
Posted:
Mon Dec 29, 2003 12:28 am
by jazz_e_bob
Will do. Thanks mate.
Global Code - Visual Refreshing issue?
Posted:
Tue Dec 30, 2003 1:42 am
by jazz_e_bob
When the following Global Code is run "animpos" does not visually change.
void ShipCollides(void)
{
meter_energy.animpos -= 1;
if ((meter_energy.animpos - 1) == -1 )
{
DestroyActor("Event Actor");
DestroyActor("meter_ship");
}
else
{
CreateActor("shield", "shield", "no parent", "no path", 0, 0, false);
}
}
Posted:
Tue Dec 30, 2003 2:30 am
by makslane
Change any internal Actor variables has no effect in Global Code. So, the line "meter_energy.animpos -= 1;" don't works
Posted:
Tue Dec 30, 2003 3:40 am
by jazz_e_bob
Hmmm
I can control actor events but not change actor parameters.
Is there a reason for this?
I think I would like to be able to control parameters too...
Posted:
Tue Dec 30, 2003 4:24 am
by makslane
Is there a reason for this?
Yes, is a performance degradation to allow this
Posted:
Tue Dec 30, 2003 5:58 am
by jazz_e_bob
Fair enough.