Global variable woes

Mapping & modding Fallout Tactics and reviewing maps thereof.
Post Reply
User avatar
Retlaw83
Goatse Messiah
Goatse Messiah
Posts: 5326
Joined: Sat Jul 17, 2004 1:49 am

Global variable woes

Post by Retlaw83 »

I've been trying to figure out how global variables work, but the default campaign is not a good teacher. It seems to run around in circles, and I can never find a starting point.

I've been trying to find custom campaigns for examples, but they all seem to be broken down into individual maps these days.

Could somebody explain things to me, or tell me where to find an intact custom campaign? Or preferably both?
"You're going to have a tough time doing that without your head, palooka."
- the Vault Dweller
quietfanatic
Respected
Respected
Posts: 88
Joined: Sun Jan 04, 2004 1:54 am
Location: Sydney, Australia

Post by quietfanatic »

In theory, if you tick the variable as 'campaign', it should be able to trigger actions anywhere in the campaign.

In my attempt at a campaign, I had the looping problem as well, does anyone know how to fix it?

I haven't actually tested campaign variables yet, as I am too busy.
Forgive my ignorance master.
DIE...die weak fool (cue Bozar death)
User avatar
Jimmyjay86
Hero of the Glowing Lands
Hero of the Glowing Lands
Posts: 2102
Joined: Thu Apr 18, 2002 4:02 am
Location: Wisconsin
Contact:

Post by Jimmyjay86 »

I'm not too familiar with them but it depends on how they are used. The original campaign was extremely linear so the second time you visited the map, you could no longer affect anything. But there was a check to make sure that everything did not reset. If you are returning to a map often and in a non-linear way, you will need multiple checks to see how global variables have changed. It's basically an "if-then" statement. If you have ever done any "basic", "fortran", etc programming you should have a good idea of how to set it up. But remember to have a complete idea of progressive gameplay before you start building the triggers for each mission or it will become very difficult quickly. You should work it all out on paper before doing any scripting.
User avatar
Retlaw83
Goatse Messiah
Goatse Messiah
Posts: 5326
Joined: Sat Jul 17, 2004 1:49 am

Post by Retlaw83 »

I've started doing that. I also dug into the a few different campaign missions deeper, and a few bunkers. During the course of this, I flipped the trigger and speech files on their backs, fucked the shit out of them, and got the idea of what I'm supposed to do.

On another campaign topic, you told me once that you had a sound file for a mission breifing but you never released it with the map. Did you ever get the sound file to play? My mission doesn't like playing my brief or debrief, but all the character sound files work fine.
"You're going to have a tough time doing that without your head, palooka."
- the Vault Dweller
User avatar
Jimmyjay86
Hero of the Glowing Lands
Hero of the Glowing Lands
Posts: 2102
Joined: Thu Apr 18, 2002 4:02 am
Location: Wisconsin
Contact:

Post by Jimmyjay86 »

Retlaw83 wrote:I've started doing that. I also dug into the a few different campaign missions deeper, and a few bunkers. During the course of this, I flipped the trigger and speech files on their backs, fucked the shit out of them, and got the idea of what I'm supposed to do.
As you have found out, the best thing to do before starting a campaign is to study the existing campaign to find out what makes it tick. You will notice that in the first mission every campaign variable(CVAR) is initialized to "False". Only when something is completed is the CVAR switched to a "True" value by a trigger. One thing I noticed was that the design team had no common way to write "True" or "False". Sometimes they used "T" and sometimes "TRUE". I think it makes a difference, so always stick with a standard way of doing things.
On another campaign topic, you told me once that you had a sound file for a mission breifing but you never released it with the map. Did you ever get the sound file to play? My mission doesn't like playing my brief or debrief, but all the character sound files work fine.
IIRC, I didn't have any problems getting it to work. I should have an old thread on it here someplace. I believe I lost the file when I had a hard drive crash. Which brings me to a very important point. BACK UP FREQUENTLY!!! There have been several people here that have lost lots of important work due to crashes. It is very discouraging so don't become a victim. Try burning a backup cd of important data every week.
User avatar
Retlaw83
Goatse Messiah
Goatse Messiah
Posts: 5326
Joined: Sat Jul 17, 2004 1:49 am

Post by Retlaw83 »

I already experienced that the hard way. My level geometry got screwed up on the first try at my first mission, and I had nothing to backup from.

But I rebuilt it better, so it worked out fine.

I standardize my "true" and "false" statements, but I don't think it matters how you do it. Some of the CVAR referencing stuff in the bunkers will have a different format for "true/false" statements than the same CVAR found in a mission.
"You're going to have a tough time doing that without your head, palooka."
- the Vault Dweller
User avatar
PaladinHeart
Strider
Strider
Posts: 747
Joined: Sun Feb 02, 2003 5:28 am
Contact:

RE

Post by PaladinHeart »

I think the global variables are whatever you set them as. You could have it set to A, B, C, etc.. But it is important to remember what your global variables are.

It can be useful knowing that you can have many different variables if you want the campaign to have several different ways of doing things and what those things to effect something later on.
"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. " -John 3:16

Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
User avatar
Retlaw83
Goatse Messiah
Goatse Messiah
Posts: 5326
Joined: Sat Jul 17, 2004 1:49 am

Post by Retlaw83 »

I gotta try that sometime, if I ever build something that requires it.
"You're going to have a tough time doing that without your head, palooka."
- the Vault Dweller
Post Reply