• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How do i create this trigger.

Status
Not open for further replies.
Level 19
Joined
Jun 16, 2007
Messages
1,574
Ok I'm wondering its for my campaign.

How to create a random event if Hero contains a spell (Monkey Tail)

And every Night he Transforms into a Monkey But i don't want it to be every night. I was wondering would someone help me create a event that does this.

Creates a moon at night. But not ever night
Detects the hero has the "Monkey Tail"
Then Transforms the unit
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
Thank you Eleandor.

Knowing me if i did it would probley crash the game :D





Ok for somereason my Game cache load triggers don't work..

I understand that i don't have a restore Unit but i don't no how to restore the unit because the tutorials i've seen don't display how to do it.

Triggers below --------- Doesn't Load Unit of cause :p ----------

  • Load Game Cache
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game Cache - Create a game cache from DBZCache.w3v
      • Set DBZCache = (Last created game cache)
  • Restore Gold
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set Gold = (Load Gold of Resources from DBZCache)
      • Player - Set Player 1 (Red) Current gold to Gold
  • Restore Hero Name
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set HeroName = (Load HeroName of Heros from DBZCache)
      • Game - Display to (All players) for 20.00 seconds the text: (Your heros proper name is the last game was: + (Load HeroName of Heros from DBZCache))


Trigger Below ---------- causes game to crash ---------

  • Restore
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Game Cache - Restore (Proper name of (Triggering unit)) of Category from DBZCache for Player 1 (Red) at (Center of Enter1 <gen>) facing 0.00
      • Wait 0.10 seconds
      • Set Gold = (Load Gold of Resources from DBZCache)
      • Player - Set Player 1 (Red) Current gold to Gold
      • Wait 0.10 seconds
      • Set HeroName = (Load HeroName of Heros from DBZCache)
      • Game - Display to (All players) for 20.00 seconds the text: (Your heros proper name is the last game was: + (Load HeroName of Heros from DBZCache))
 
Last edited:
Level 19
Joined
Jun 16, 2007
Messages
1,574
My Game Cache Save:

  • Move To West City
    • Events
      • Map initialization
      • Unit - A unit enters Enter Cap <gen>
      • Unit - A unit enters Enter Cap2 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Game Cache - Create a game cache from DBZCache.w3v
      • Set DBZCache = (Last created game cache)
      • Game Cache - Save DBZCache
      • Wait 0.10 seconds
      • Game Cache - Store (Triggering unit) as (Proper name of (Triggering unit)) of Unit in DBZCache
      • Game Cache - Save DBZCache
      • Wait 0.10 seconds
      • Set Gold = (Player 1 (Red) Current gold)
      • Game Cache - Store Gold as Gold of Resources in DBZCache
      • Game Cache - Save DBZCache
      • Wait 0.10 seconds
      • Set HeroName = (Proper name of (Triggering unit))
      • Game Cache - Store HeroName as HeroName of Heros in DBZCache
      • Game Cache - Save (Last created game cache)
      • Wait 0.10 seconds
      • Game - Set the next level to WestCity.w3x
      • Game - Victory Player 1 (Red) (Skip dialogs, Skip scores)
thats why i used (Triggering Unit))
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
What can "triggering unit" be? Does player 1 only control 1 hero? If so, just store (triggering unit) as Hero of Category.

Then load "Hero" of "Category" from game cache.

Also, you only need to save your game cache once. The wait 0,1 seconds aren't required either, they only make the script heavier.
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
ok let me see if it stops crashing after i edit the scripts.

also do i really need this

  • Load Game Cache
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game Cache - Create a game cache from DBZCache.w3v
      • Set DBZCache = (Last created game cache)
Or should i make it look like this:

  • Load Game Cache
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game Cache - Create a game cache from DBZCache.w3v
      • Set DBZCache = (Last created game cache)
      • Game Cache - Restore (Proper name of (Triggering unit)) of Unit from DBZCache for Player 1 (Red) at (Center of Enter1 <gen>) facing 0.00
      • Set Gold = (Load Gold of Resources from DBZCache)
      • Player - Set Player 1 (Red) Current gold to Gold
      • Set HeroName = (Load HeroName of Heros from DBZCache)
      • Game - Display to (All players) for 20.00 seconds the text: (Your heros proper name is the last game was: + (Load HeroName of Heros from DBZCache))


Nvm got it working xD thank you once again.
 
Last edited:
Status
Not open for further replies.
Top