• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Unit not moving Instantly

Status
Not open for further replies.
Level 8
Joined
Jul 10, 2018
Messages
383
Code:
Magtheridon
    Events
        Unit - A unit enters O44689 <gen>
        Unit - A unit enters O44716 <gen>
    Conditions
        ((Entering unit) is A Hero) Equal to True
        (Owner of (Triggering unit)) Not equal to Player 10 (Light Blue)
        (Owner of (Triggering unit)) Not equal to Player 11 (Dark Green)
        (Owner of (Triggering unit)) Not equal to Player 12 (Brown)
    Actions
        Trigger - Turn off (This trigger)
        Unit - Pause all units
        Sound - Stop the currently playing music theme
        Sound - Stop music Immediately
        Quest - Mark O23214[1] as Completed
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                O48120 Greater than or equal to 2
            Then - Actions
                For each (Integer A) from 1 to 4, do (Actions)
                    Loop - Actions
                        Hero - Learn skill for Jezrometh 0012 <gen>: Chain Lightning (Dark)
            Else - Actions
                Do nothing
        Item - Pick every item in O42202 <gen> and do (Actions)
            Loop - Actions
                Item - Remove (Picked item)
        Unit - Move Jezrometh 0012 <gen> instantly to (Center of O42202 <gen>), facing 225.00 degrees
        Hero - Create Necklace of Spell Immunity and give it to Jezrometh 0012 <gen>
        For each (Integer A) from 1 to 8, do (Actions)
            Loop - Actions
                Unit - Move O22452[(Integer A)] instantly to ((Center of O42202 <gen>) offset by 500.00 towards (180.00 + (45.00 x (Real((Integer A))))) degrees), facing (Center of O42202 <gen>)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Camera - Pan camera for (Picked player) to (Center of O42202 <gen>) over 0.00 seconds
        Visibility - Destroy (Last created visibility modifier)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility from (Center of O42202 <gen>) to a radius of 1000.00
        Visibility - Enable (Last created visibility modifier)
        Sound - Play O45290 <gen> at 100.00% volume, located at (Center of O42202 <gen>) with Z offset 0.00
        Wait 3.00 seconds
        Sound - Play O45772 <gen> at 100.00% volume, located at (Center of O42202 <gen>) with Z offset 0.00
        Environment - Create at O42202 <gen> the weather effect Ashenvale Rain (Heavy)
        Environment - Turn (Last created weather effect) On
        Wait 4.00 seconds
        Set O47997 = 5
        Trigger - Run O53146 <gen> (ignoring conditions)
        Trigger - Turn on O97661 <gen>
        Trigger - Turn off O84847 <gen>
        Wait 7.00 seconds
        Unit - Unpause all units
        Wait 1.00 seconds
        Trigger - Turn on Fix <gen>
        Trigger - Turn on O105863 <gen>
        Custom script:   call DestroyTrigger(GetTriggeringTrigger())




This code is supposed when entering The Region it Teleports the player to Another Region but it's not working for some reason.


This is The code:
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Unit - Move O22452[(Integer A)] instantly to ((Center of O42202 <gen>) offset by 500.00 towards (180.00 + (45.00 x (Real((Integer A))))) degrees), facing (Center of O42202 <gen>)

022452 Variable is UNIT Responds to The Player himself do i need to set it in Different trigger?
 
Level 12
Joined
Nov 3, 2013
Messages
989
Where do you set your 8 units to O22452[1], O22452[2], O22452[3]... , O22452[8]?

Either you haven't done it, or you have another trigger that you're not showing.


Also, if you change the BBcode to [.trigger] and [./trigger] it will be a lot easier to read.

  • like this
 
Level 8
Joined
Jul 10, 2018
Messages
383
This is the Trigger that turns on the Trigger for Units to move too.

  • O105863
    • Events
      • Unit - A unit enters O44689 <gen>
      • Unit - A unit enters O44716 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) controller) Equal to User
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (O97661 <gen> is on) Not equal to True
          • (Jezrometh 0012 <gen> is dead) Equal to True
          • ((Units in O42202 <gen> owned by Player 10 (Light Blue)) is empty) Equal to True
        • Then - Actions
          • Unit - Move (Triggering unit) instantly to (Center of O44425 <gen>)
          • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of O44425 <gen>) over 0.00 seconds
        • Else - Actions
          • Unit - Move (Triggering unit) instantly to ((Center of O42202 <gen>) offset by (0.00, -500.00))
          • Camera - Pan camera for (Owner of (Triggering unit)) to (Position of (Triggering unit)) over 0.00 seconds
Tho it doesn't work and it doesn't move them it just Enables the Music Rotate the Offsets of Jezrometh [Boss] and thats it
 
Level 12
Joined
Nov 3, 2013
Messages
989
I think triggering unit might not work on a unit enters/leaves a region events.

Try "entering unit" and see if that fixes it.
 
Level 39
Joined
Feb 27, 2007
Messages
5,069
Also, if you change the BBcode to [.trigger] and [./trigger] it will be a lot easier to read.
If you change the BBcode to [plain][trigger][/trigger][/plain] you won't need the periods to avoid actually making the tag happen.
I fixed it by adding Entering unit in the First Trigger,but for somereason it won't turn on the Trigger when i put Turn on this
You didn't put a trigger there. Side note: you really should write better variable names. It's very hard to tell which variable is which variable for anyone attempting to troubleshoot your code, and it likely makes you much more prone to error when editing/revising your code.
Why are all your variable and trigger names obfuscated? That has got to be a nightmare to work with.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,906
Try "entering unit" and see if that fixes it.
I'm pretty sure that isn't what can fix the trigger because entering unit is in fact triggering unit, it is just much faster to choose. 75% of event responses can use triggering unit instead of casting unit, constructed unit, constructing unit etc. As for the trigger, it's pretty hard to understand since the names are a total chaos, but try enabling and disabling certain conditions to see what works and what doesn't.
 
Status
Not open for further replies.
Top