Warfare Incorporated :: View topic - Persistent Variables - When do they go away?
Warfare Incorporated Forum Index
 FAQ   Search   Memberlist   Usergroups 
 Profile   Log in to check your private messages   Log in 
 
Persistent Variables - When do they go away?

 
Post new topic   Reply to topic    Warfare Incorporated Forum Index -> Mission Authoring
View previous topic :: View next topic  
Author Message
Verdagon
Veteran Member


Joined: 05 Oct 2003
Posts: 1047
Location: San Luis Obispo, CA

PostPosted: Fri Jun 11, 2004 7:43 pm    Post subject: Persistent Variables - When do they go away? Reply with quote

If you create a persistent variable, how long will it last? Is it deleted at the end of the current campaign/mission, or maybe on soft reset, or never?

The reason I want to know is that I want to be able to tell if someone has beaten my other levels, to unlock a final one. That could be accomplished if the persistent variables never disappeared, or something like that...

_________________
[WI Moderator]
http://verdagon.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
UGMC
Mega-Poster


Joined: 03 Jun 2004
Posts: 348
Location: my own little world

PostPosted: Sat Jun 12, 2004 4:14 am    Post subject: Reply with quote

Hmmm... that would be cool. Unlocking missions... I like it. Well, I don't know if it can be done, though. I even even considered for myself "multiple paths" for a campaign, where if you lose one, you can still advance, but to a different mission that planned without any promotions.
Back to top
View user's profile Send private message
Verdagon
Veteran Member


Joined: 05 Oct 2003
Posts: 1047
Location: San Luis Obispo, CA

PostPosted: Sat Jun 12, 2004 10:52 am    Post subject: Reply with quote

Multiple paths campaign are really cool. My VC2 campaign has that, where you crash land and either walk to the left or right, which determines the next mission.

*crosses fingers, hoping that unlicking missions is possible*

_________________
[WI Moderator]
http://verdagon.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
UGMC
Mega-Poster


Joined: 03 Jun 2004
Posts: 348
Location: my own little world

PostPosted: Mon Jun 14, 2004 3:44 pm    Post subject: Reply with quote

I just had a thought... there has to be some kind of variable like this in the main story missions from the original Warfare Incorporated people with the promotions that last througout the whole game. Try asking about this.
Back to top
View user's profile Send private message
crakerz
Mega-Poster


Joined: 17 Sep 2003
Posts: 353
Location: California Bay Area

PostPosted: Mon Jun 14, 2004 6:06 pm    Post subject: Reply with quote

Check out this thread:

http://www.handmark.com/warfare/forum/viewtopic.php?t=918

Basically, pvars can be saved, and they persist (hence the name) as long as the game or level is running. For example, if you exit the game from within a level, the pvars are preserved when you return to it. If you exit a level and start another, the pvars are not automatically reset. If you save a level, the pvars are saved with it.

_________________
Why negotiate when you can just blow things up?
------------------------------------------------------
Back to top
View user's profile Send private message Send e-mail
dws90
Very Active User


Joined: 03 Mar 2004
Posts: 118

PostPosted: Tue Jun 15, 2004 8:33 pm    Post subject: Reply with quote

*crosses fingers, hoping that unlicking missions is possible*

Hehe, funny typo.
Back to top
View user's profile Send private message Send e-mail
UGMC
Mega-Poster


Joined: 03 Jun 2004
Posts: 348
Location: my own little world

PostPosted: Thu Jun 17, 2004 4:19 am    Post subject: Reply with quote

So you can have a persistant variable triggers even a few levels after it is set? Like say you leave a level with 5,6000 galaxite. If you have the triggers set up right, can you enter it with that much too?
Back to top
View user's profile Send private message
Verdagon
Veteran Member


Joined: 05 Oct 2003
Posts: 1047
Location: San Luis Obispo, CA

PostPosted: Thu Jun 17, 2004 1:01 pm    Post subject: Reply with quote

dws90 wrote:
*crosses fingers, hoping that unlicking missions is possible*

Hehe, funny typo.


Hehe, whoops.

UGMC, yes that is possible. it'd take a few triggers though.

Condition: Side1 has at least 20000 galaxite
Action: Subtract 20000 galaxite from Side1
Action: Add 20000 to pvar1
Action: Preserve trigger

Condition: Side1 has at least 5000 galaxite
Action: Subtract 5000 galaxite from Side1
Action: Add 5000 to pvar1
Action: Preserve trigger

Condition: Side1 has at least 1000 galaxite
Action: Subtract 1000 galaxite from side1
Action: Add 1000 to pvar1
Action: Preserve trigger

Condition: Side1 has at least 200 galaxite
Action: Subtract 200 galaxite from side1
Action: Add 200 to pvar1
Action: Preserve trigger

Condition: Side1 has at least 50 galaxite
Action: Subtract 50 galaxite from side1
Action: Add 50 to pvar1
Action: Preserve trigger

And so on... hey I should try this in one of my missions.

_________________
[WI Moderator]
http://verdagon.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
UGMC
Mega-Poster


Joined: 03 Jun 2004
Posts: 348
Location: my own little world

PostPosted: Thu Jun 17, 2004 3:06 pm    Post subject: Reply with quote

Durrr... still confused. Why are there subtract galaxite actions in there? And, are any of those triggers to make the person get the galaxite at the start of the next level? And, when you add numbers to a persistant variable, how does that convert to galaxite later?
Back to top
View user's profile Send private message
Verdagon
Veteran Member


Joined: 05 Oct 2003
Posts: 1047
Location: San Luis Obispo, CA

PostPosted: Thu Jun 17, 2004 9:24 pm    Post subject: Reply with quote

Whoops, forgot to add the second section.

Just do the same thing in the next level, but subtract from the pvar and add the galaxite. Example:

Condition: pvar1 is at least 20000
Action: subtract 20000 from pvar1
Action: Add 20000 credits for Side1
Action: Preserve trigger


Condition: pvar1 is at least 5000
Action: subtract 5000 from pvar1
Action: Add 5000 credits for Side1
Action: Preserve trigger


...and so on.

PS. In the first section, the subtract galaxite things are in there because if they weren't, the pvar would keep adding. When does it know to stop? Let's say side1 has 26000 credits. The first trigger...
Condition: Side1 has at least 20000 galaxite
Action: Subtract 20000 galaxite from Side1
Action: Add 20000 to pvar1
Action: Preserve trigger
...would keep adding 20000 to pvar1 and never stop. If it is subtracted from the player's credits, however, they'll have less galaxite and the trigger won't fire again. It's kind of hard to explain.

_________________
[WI Moderator]
http://verdagon.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
ajcross
Very Active User


Joined: 23 Dec 2003
Posts: 113
Location: Kansas City

PostPosted: Thu Jun 17, 2004 10:30 pm    Post subject: Reply with quote

Verdagon wrote:
Condition: pvar1 is at least 20000
Action: subtract 20000 from pvar1
Action: Add 20000 credits for Side1
Action: Preserve trigger


You will want another condition if you want to use this for multiple missions.

Say this after a Mission Loaded trigger sets it:
Condition: Persistent variable 'missionstate' is 1

Set it again to enable the post game processing to subtract the credits:
Condition: Persistent variable 'missionstate' is 2

Then set it yet again to do the actual End Mission action.

_________________
Andy Cross
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Warfare Incorporated Forum Index -> Mission Authoring All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2002 phpBB Group