Page 1 of 1
question about variables
Posted: Wed Dec 27, 2006 10:17
by LIT
Is there any way to define some variable which needs to program an object with complex behavior (for example the projectile with explosion depends upon the distance projectile had flown). Unfortunatly JumpIfInventory doesn't help in this case.
Posted: Wed Dec 27, 2006 11:51
by TheDarkArchon
In short, no.
Posted: Wed Dec 27, 2006 19:19
by wildweasel
If JumpifInventory won't do the job, then there is probably no solution.
Re: question about variables
Posted: Thu Dec 28, 2006 9:37
by LIT
LIT wrote:for example the projectile with explosion depends upon the distance projectile had flown
Lame example: due to the constant speed of moving the disnance could be measured in tics, so each x tics we can remove projectile (with the help of redirecting to the end of death state to avoid death effects) and spawn another projectile with a bit different properties. It may costs dozens actors but still works.
2wildweasel:
is there any way to convince Randy that JumpIfInventory should works for each actor (not only player own)? It would be very useful. And the second thing should be done - to teach Decorate to use CVARs.
Posted: Thu Dec 28, 2006 9:42
by wildweasel
I am not sure that Randy would consider such an addition worth the time and effort. You're welcome to try, but I make no guarantees.
Posted: Thu Dec 28, 2006 11:48
by LIT
http://forum.zdoom.org/potato.php?t=12462
It's seems my English is too poor. Does anyone understand i want to say?

Posted: Fri Dec 29, 2006 17:12
by Zeg-Vok
Well, you can use big English words, but still. You should just give Examples of what you want to be able to do, because what I got out of your question is the following:
You want to be able to make a projectile that based on a certain type or amount of an inventory item in its possession at the time decisdes what type of explosion it will have. So basically as it keeps flying it will lose or gain an inventory item like "Flightlength" and when it calls its Death State it would check to see how many of "Flightlength" it has and then jump to the proper line accordingly.
Posted: Fri Dec 29, 2006 20:10
by LIT
In fact i want the following (in Decorate):
1) a way to define a variable
2) a way to change it's value manually or when the proper event is happened
3) a way to use the value of the variable to describe or change the properties of monsters, weapons, ect
and may be
4) a way to save the value ot the variable in need (CVAR)
Sometimes i am able to "imitate" such a variable with the help of inventory, sometimes no (or i'm wrong?). ACS Script always is binded to the map number and this is not convinient in the case of weapon wad.