HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help on turn based problem

06-17-2003, 01:37 AM#1
311
I have a turn based map and ive ran into a problem that I thought would be easy to do, but cant seem to figure it out now.
I need a way to take certain damage off certain units and to heal certain units. heres an example of a trigger I want

event: dialog button clicked
condition: dialog button = to ice fury
action: take 200dmg off of pickd unit
action: show frost nova graffic on pickd unit

I cant get either action to work, even the special effects don't work. I do create special effect at location of pickd unit, isnt that right? everything else works in my map so far the turns, the ap/sp system, but I cant get special effects/or dmg to work, hope someone can help or at least understand what I mean, its kinda hard to explain heres anoter example

event: dialog button clickd
condition: dialog button=to light heal
action: add 50life to pickd unit
action: display holylight on pickd unit


also about the pickd unit thing I found a small bug in my map I needa somehow get rid of, if I just highlight all my units I could heal all of them, so is there a trigger that makes it so you can only click 1 guy? Its no problem with enemy units cuz you can only select one of them anyway. I havent seen this bug yet im just guessing that this would happen if u did highlight all your own units
06-17-2003, 02:29 AM#2
playamarz
Typically it would on select one unit anyway.. So I really wouldn't worry too much about that.

Also... About this "picked" unit stuff... What do you exactly plan to do.. After the enemy is chosen.. After the dialog button is clicked?

The way I would do it is this.

Code:
First Trigger...

EVENT
Dialog Button is clicked;
CONDITION
Dialog button is equal to ice fury;
ACTIONS
CurrentActiveAttack is set to 4;
Send msg to Player 1 saying : "Please select the enemy you wish to target."

Second Trigger...

EVENT
A unit is selected;
CONDITION
CurrentActiveAttack not 0;
ACTIONS
Health of Last Selected Unit = Health of Last Selected Unit - SpellDamage[CurrentActiveAttack];
Show Special Effect SpellGraphics[CurrentActiveAttack] on the Origin of Last Selected Unit;
CurrentActiveAttack is set to 0;

Now what all is this you may presume... Well this is an entire battle system run off of one thing.. Arrays..., Arrays are very powerful my friend... In this example we use the variable :

CurrentActiveAttack

And we set it to a number. The number we set it to is the number of the attack that we use. Like say.. 4 in the example would be equal to the ice fury spell...

Then.. When they select a unit to attack with.. *it may be to heal.. just have to set up negative numbers...* It will do the next trigger...

In the next trigger.. This is where the action happes... First it checks to see if you clicked any units.. Then.. if you do click a unit.. It makes sure you are attacking... If you are not attacking.. it will do nothing cause CurrentActiveAttack will be equal to 0 then. If you are attacking.. Then it will go on to the actions...

In the actions.. We have set up.. Where it takes the health from the unit... taking it's current health and minusing SpellDamage[CurrentActiveAttack]. This is an array that we have set up with all the damages for each attack that we have.. Keeps it organized and we can keep track of all the attacks.. In this example it would open up the damage for SpellDamage[4] and it should be equal to 200. Same with th SpellGraphics... Another array holding the information we need for the spell.. This one is what special effect we will use to designate this spell.

If you ahve any more questions.. Gimme a hollar.
06-17-2003, 03:08 AM#3
311
ok I i think im lost but I almost got it ok so what varibles do I need? I dont get the active attack part mostly I need a varible 4 every spell I have?


this is what I get from you so far I need to make a varible for all the units in my map, and all the spells, what kinda varibles? integers? with the life of the unit and the dmg of the spell? and the active attack is an array integer? sorry im not gosu map maker like you, just need a bit more explanation :) thanks.


btw pickd unit didnt even work anyway I dunno why
06-17-2003, 04:39 AM#4
311
Ok all I need help with now is the graffix, they still dont seem to show up, I got all the damage workd out and spells in an easy way. I just need it to look cool now. So how do I get it to play holylight animation and stuff like that, everything Ive tried never seems to work
06-17-2003, 05:30 AM#5
311
Ok woohoo I found it out just a small error in trigger I had. 1 last thing and my map is done woohooo !!!! How do I get a units attack animation?

action -show pickd units animation, and I type attack into the field but I wont see it in game, it starts on stand but I dont want that. Also when I do blizzard speccial fx how do I get the whole blizzard? LoL when I did it I get 1drop of ice same with rain of fire, whats up with that? I want the entire spell to go. Also how would I get the graffic of the lighting from chimera to come out and hit an oppenet?
06-17-2003, 03:24 PM#6
playamarz
Those are questions that sometimes perplex even all of us.. Why isn't my lightning working.. And all that sort-a fun stuff.

The answer to your questions is this.

With the Blizzard and Rain of Fire spells... You are asking it to fall only once.. Therefore it'll only fall once. To make it fall many times. You will have to have some sort of for loop designated inside of it.

For Some random Point Range of 200 around Selected Attackable Unit do Special Effect.
Wait .5 seconds.

That's the only way I can think about it.