HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

several actions after an IF statement?

02-04-2003, 06:29 PM#1
Guest
Ok, I know if you don't need IF statements, you can list actions one after another if you want to do several actions.
Is there a shorter way to do IF statements of several actions though?

I know you can having several conditions in IF statements by stringing AND commands in the conditions, but what if you want several things to be done after the conditions are met?
Currently, I have to simply copy the entire IF statement again and then change the action, but there really should be an easier way to just have several actions run for an IF statement is true then run this AND this AND that.

Or is there in fact a way I don't know about yet?
02-04-2003, 06:46 PM#2
Guest
I was wondering the same thing. I can only assume that custom text would allow this since it seems like C++, but I never wanted to waste the time to learn it. If I wanted to type code I would make my own game.

break.
02-04-2003, 06:57 PM#3
Guest
Rather than creating a string of IF statements, I approach it from a different angle. I create the trigger that checks for the conditions and then runs another trigger, ignoring conditions. The referenced trigger has no events or conditions associated with it, so it only runs when the first trigger is run. This works better for me for two reasons. I can trace back my trigger bugs more efficiently and modify each section without screwing the rest up and I am not stuck doing huge IF statements. Certainly not the only way to do it, but it works for me. Especially since I can't do all that custom text mumbo jumbo.
02-04-2003, 07:08 PM#4
Guest
Not that bad...a lot more clean.
02-04-2003, 08:03 PM#5
Milkman
btw, custom text isnt C++ its JASS script its just looks like c++ right?
02-04-2003, 08:11 PM#6
Guest
no it only vaguely resembles C++ or Javascript or other languages. Among other things, JASS handles arguments, paraments and variables differently.

BUT...if you know how to program in either of those languages, you can program in JASS. Just convert triggers to custom text and look them over.

There is a manual link in the AI forum that you can find here:

http://www.wc3campaigns.com/forums/s...&threadid=9229
02-04-2003, 08:17 PM#7
Guest
i got no idea


....



....



CONDITIONS!!!!!

What bout using this trigger:

if = condition
then = actions
02-04-2003, 10:45 PM#8
CBWhiz
if your only checking for one thing, you can use a combination of skip remaining actions and run trigger, like suggested above.