question about variables

Do you have a question about making weapon mods, or do you just need some tutorials and resources? Ask about all of that here.

Moderator: wildweasel

Locked
LIT
Posts: 14
Joined: Wed Dec 27, 2006 9:28

question about variables

Post 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.
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

In short, no.
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

If JumpifInventory won't do the job, then there is probably no solution.
LIT
Posts: 14
Joined: Wed Dec 27, 2006 9:28

Re: question about variables

Post 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.
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post 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.
LIT
Posts: 14
Joined: Wed Dec 27, 2006 9:28

Post 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? :?
User avatar
Zeg-Vok
Posts: 233
Joined: Wed Sep 21, 2005 18:04
Location: Up the creek without a paddle
Contact:

Post 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.
LIT
Posts: 14
Joined: Wed Dec 27, 2006 9:28

Post 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.
Locked

Return to “Weapon Modding Help & Resources”