• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Dialog and various trigger problems

Status
Not open for further replies.
Level 4
Joined
Feb 4, 2008
Messages
82
Hello everyone :) once again it is me...

1- I am making a trigger for a dialog that permits the user to add and choose his attributes whenever he gains a level here is my code...
  • Number of Skills Per level
    • Events
      • Unit - A unit owned by Player 1 (Red) Gains a level
    • Conditions
    • Actions
      • Set No_Skills_Clicked = (No_Skills_Clicked + 4)
  • Number of Skills
    • Events
      • Dialog - A dialog button is clicked for Skills_Dialog
    • Conditions
    • Actions
      • Set No_Skills_Clicked = (No_Skills_Clicked - 1)
      • Set No_Skills = No_Skills_Clicked
  • Skill Dialog
    • Events
      • Unit - A unit owned by Player 1 (Red) Gains a level
    • Conditions
    • Actions
      • Dialog - Clear Skills_Dialog
      • Dialog - Change the title of Skills_Dialog to (Please assign your attribute points remaining: + (String(No_Skills)))
      • Dialog - Create a dialog button for Skills_Dialog labelled Agility
      • Set Agility = (Last created dialog Button)
      • Dialog - Create a dialog button for Skills_Dialog labelled Strength
      • Set Strength = (Last created dialog Button)
      • Dialog - Create a dialog button for Skills_Dialog labelled Intelligence
      • Set Intelligence = (Last created dialog Button)
      • Dialog - Show Skills_Dialog for Player 1 (Red)
  • Agility Button
    • Events
      • Dialog - A dialog button is clicked for Skills_Dialog
    • Conditions
      • (Clicked dialog button) Equal to Agility
    • Actions
      • Hero - Modify Agility of (Triggering unit): Add 1
now i think to some extent the dialog itself work good but the buttons doesn't work at all once i click on any button no actions are done and the hero never gets any skills, any ideas what i have done wrong?


2- I am trying to make a trigger to mimic the behavior of traps in the level in WC III: TFT when Arthas is separated from Anub'arak in the dungeons (temple of the nuberians) but sadly i didn't achieve it, anyone have an idea (my damage is random and doesn't co-ordinate with the effects) in other words how to associate damage with the special effects made?

3- I am trying to make some sort of doodad to be floating in water, and that doodad should travel (on water) from region1 to region2.

a- how can i make a doodad float (i searched in object editor for the floating option and i didn't find anything..)
b- how can i order a doodad to move?
c- if that doodad is changed to a unit instead of a doodad, how can i make it float in water?

Thank you very much for your patience.
 
Level 3
Joined
Jan 31, 2008
Messages
66
Hi Ithink this will solve the problem? i'm not too sure, u can try this out though :grin:
  • Number of Skills
    • Events
      • Dialog - A dialog button is clicked for Skills_Dialog
    • Conditions
    • Actions
      • Set No_Skills_Clicked = (No_Skills_Clicked - 1)
      • Set No_Skills = No_Skills_Clicked
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Agility
        • Then - Actions
          • Hero - Modify Agility of (Triggering unit): Add 1
        • Else - Actions
And Dun mind my pop, it's a loser named pyrite who did it....
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
1. In your last trigger, you say
Hero - Modify Agility of (Triggering unit): Add 1

But there's no triggering unit in that trigger. You can only refer to "triggering unit" if there is a unit that actually "triggered" the trigger, causing it to run. e.g. Unit - a unit casts an ability would have a triggering unit, because the trigger starts running because of a unit doing something. In your trigger, something happens to a dialog, not to a unit, thus there can't be a triggering unit.
You could solve it by setting a hero variable = the hero player 1 chose, then refer to this variable when you're modifying agility.

A note to your dialog system: you should perhaps only create the dialog box ONCE at the start of the game, add the 3 buttons to it, assign the correct variables, and never clear the dialog ever in the game. Then, when a unit gains a level, all you need to do is show the dialog to the player, instead of clearing it and initialising it again.

2) I should have some info on how you made the traps work ( + triggers?)

3) a / b : you can't do either of them. You can mimic the effects by changing the doodad into a unit... What do you need this for?
C : look at a ship from TFT campaign, those "float" on water... it's probably something like "pathing - water pathable"...
 
Level 4
Joined
Feb 4, 2008
Messages
82
First of all THANK YOU VERY MUCH i don't know what got into me lately and i didn't see this "triggering unit" part i will add that variable for sure, thank you agian.

for the traps i only made a region and added the special effect of a frost trap that is all i never made the triggers because i don't know how would they work but i think they should look something like this

Event:
Player enter region
Condition:
Special effect is on
Action:
Do damage to player

or so i think that is all...

For the water travel i want to make the player to travel and cross a sea area riding on something that can float or simulate the effect so he can stop at a point and fight enemies that will attack him (weather the floating thing is unit or doodad won't matter as long as it does the trick).

Thank you for trying to help i appreciate it, looking forword for your reply
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
2) So you're basically using the frost trap doodad? Try taking a look at that reign of chaos blizzard map, it has triggers for that kind of traps. Basically, it's a trigger that runs every 3 seconds. When it runs, it sets the animation of that doodad to "stand" (or something like that), then damages every unit in the region around the doodad, waits half a second, then changes the animation of the doodad to "dead". That process is repeated every 3 seconds.

3) No idea...
 
Level 4
Joined
Feb 4, 2008
Messages
82
Thank you very much for th help Eleandor, i will try that trap idea hopefully it works.

I looked up in the editor for a variable to associate with the hero i never found anything of the sort i tried to make the variable associate to the player (type of variable = player) but i can't put
Hero - Modify Agility of (player type variable): Add 1
i thought hey maybe a unit type should work, but it didn't.
Hero - Modify Agility of (Unit type variable): Add 1

Basically the sort of trigger that can be used there are "general unit" variables only and that won't work iirc.

well if anyone could help with that floating idea would be great because i tried various sorts of tricks and nothing seemed to be efficient.

Of course along with the dialog triggers

Thanks again ELeandor i appreciate your help :D
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Basically, you need a unit array variable, named Hero.

When you choose your hero, this is what you do:
  • Events
    • Hero is chosen (wisp enters region? tavern sells unit?)
  • Actions
    • set Hero[player number of owner of triggering unit] = the chosen hero
In your dialog, or any other trigger, you can refer to the hero owned by the player by using the Hero[player number of owner of triggering unit] variable.

I still don't have an idea how you would do the floating thing...
 
Level 4
Joined
Feb 4, 2008
Messages
82
Ahha, thank you very much that would do i rekon both Eleandor and The-Weeh.

Anyone knows any solution for the other problems ? :)
 
Level 6
Joined
Dec 28, 2007
Messages
111
I dind't understand Question 2 but Question 3..

U can make a unit with the model of your doodad (Art - Model file)
And then u can change the flying height of unit.. (Movement - Height) Change to u get the right height (So it looks like its floating)...
And then u can use "Order unit to move to" action in the triggers.. Hmm i think that would do some of the work
 
Level 4
Joined
Feb 4, 2008
Messages
82
Yup it would do the travel part but the problem lies where how am i going to order my unit (or the player's hero) to stand on that unit\doodad then how would i give the player the freedom to get off that unit at any point he likes?

Question 2 is as follows...

1- You walk in a dungeon
2- You notice an area with alot of impale traps
3- You see that the impale traps damage you when their animation is active but they do no damage when their animation is off.

How would i simulate the above?

(i know how to add a special effect to a region but i don't know how to co-ordinate the damage caused to a unit with the animation being active or not)
 
Level 4
Joined
Feb 4, 2008
Messages
82
why would i use a spell ? i already added the special effects the problem is with timing the damage done so it is caused only when the special effects are firing, no need for the dummy unit stuff i think...

Yes i repped you i am sorry i just forgot.
 
Level 4
Joined
Feb 4, 2008
Messages
82
Well if it is water thing, what do you mean? how would a spell be useful to me?

Is there a spell which makes stuff float on water? and units ride on that floating thingy ?
 
Level 7
Joined
Mar 16, 2008
Messages
348
Mmm i think there is only one way with the trap tingy.
you have tu use a watch to keep track of exactly how much time is the animation on and animation off. wait a sec ill make the trigger and brb posting it.

All of the following triggers SHOULD BE ONLY ACTIVATED WHEN THE HERO STARTS SEEING THESE ANIMATIONS, AND NOT AT THE START OF THE GAME
Preparation :
1.Create variable TimerAnimationBoolean
2.Test your map and use a watch to keep track of exactly how many seconds is the trap animation on and how many is it off!!! this is IMPORTANT
3.Create a region for each trap ( i think you have more than one right?)

Trigger name should be something like: Timer Trap Animation Damage On
  • Events
    • Time - Every (time of animation off) seconds of game time
  • Conditions
    • TimerAnimationBoolean = false
  • Actions
    • Set TimerAnimationBoolean = true
Trigger name should be something like: Timer Trap Animation Damage Off
  • Events
    • Time - Every (time of animation on) seconds of game time
  • Conditions
    • TimerAnimationBoolean = true
  • Actions
    • Set TimerAnimationBoolean = false
Trigger name should be something like: Timer Trap Animation Damage On
  • Events
  • Unit - A unit enters (trap 1 region)
  • Unit - A unit enters (trap 2 region)
  • (and make same for trap 3 bla bla bla)
  • Conditions
  • TimerAnimationBoolean = true
  • Actions
  • (here depends on what you want.)
  • (you can kill, reduce life, remove etc but thats up to you)
It may be a little long and complicated but there is one bug that i can see, if the unit enters the trap while its OFF and stays there in the same place then when the trap gets ON the unit will not be damaged. Well good luck!!!!
 
Last edited by a moderator:
Level 4
Joined
Feb 4, 2008
Messages
82
THANK YOU very much :D it is really a good trigger i tried it and worked except for the one problem you stated so i figured if the only way to do this is through timers and faking it as if when the trap is on it does dmg,i thought the timer only and a damage trigger could work better..

  • Event
  • Timer - Every 3-4 secs
  • Action
  • Cause unit in Region XXXX to take XXXX damage
will simulate the same effect but less triggers and it will go on even if the player stays on the region.

but the thing with this trigger is, i don't know if that will co-ordinate with the animation in the region (like the special effect of imaple ofr example) it might be reversed for all i know...
 
Status
Not open for further replies.
Top