wc3edit.net

United Warcraft 3 map hacking!
It is currently March 29th, 2024, 8:10 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: [Help] With trigger
PostPosted: September 30th, 2012, 6:33 pm 
Offline
Member
User avatar

Joined: November 15th, 2008, 11:50 pm
Posts: 50
Attachment:
trigger.gif

So this trigger works but not in the way I intended it to.
What I want to happen is when the launch long range nuke ability is cast, a missile is created which travels to the target point which is then replaced by another unit which is an explosion and everything within a certain radius of that explosion dies, and the missile itself disappears. However, what is happening is that the explosion is spawned at the target point before the missile reaches it(it happens the moment the ability is cast) and everything in the radius of that explosion is killed, the missile reaches the target point and it just sits there... If you guys would like a replay to more fully understand what is happening if I have not explained it clearly enough, please ask me for one and I will make one. Any help on this matter would be greatly appreciated.


You do not have the required permissions to view the files attached to this post.

_________________
Image


Top
 Profile  
 
 Post subject: Re: [Help] With trigger
PostPosted: September 30th, 2012, 10:42 pm 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
I think i found the problem..but im a bit busy today so i cant really test it out, but what i think is happening is that basicly there is no wait time between the missile moving and having it explode.

So, when the trigger goes off, everything in it goes off at once. Basicly it creates a missile at point A, then immediately checks if the distance to the target B is 0, there is no time for the missile to actually move.

Without too much testing, your best bet to fixing this would probably be by using a unit variable and assigning it to the missile. Then creating a new trigger which checks how the distance is between the targets.

_________________
Image


Top
 Profile  
 
 Post subject: Re: [Help] With trigger
PostPosted: October 1st, 2012, 12:09 am 
Offline
Member
User avatar

Joined: November 15th, 2008, 11:50 pm
Posts: 50
Yea but the distance between point A and point B is not 0 when the missile first spawns though so I don't see why this would be happening.

God, I wish I could see the way the original trigger for this... the thing is, I took over this map and restored almost all of the triggers except this and another trigger. The reason I am working on this map was because the map was massively unbalanced and less realistic, I think the zombies should have to wipe out the humans before they advance too far, if the humans get their top techs then the zombies will be wiped out and there will be no stalemate, no zombies using the massively unbalanced level five zombie which pretty much kill the thing that kills them and then spawns another zombie(if the zombies got level 5s in the original version, it was pretty much game over for the humans, even with nukes and satellite strikes and air units)... original map is called Eras Zombie Invasion v.83 opt v18.

_________________
Image


Top
 Profile  
 
 Post subject: Re: [Help] With trigger
PostPosted: October 1st, 2012, 1:49 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
So..there might be something else going on which is causing that. I've recreated the trigger
Code:
Untitled Trigger 001
    Events
        Unit - A unit Begins casting an ability
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Ability being cast) Equal to Missile
            Then - Actions
                Unit - Create 1 DummyMissile for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Target point of ability being cast)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Last created unit)) Equal to DummyMissile
                    Then - Actions
                        Unit - Order (Last created unit) to Move To (Target point of ability being cast)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between (Position of (Ordered unit)) and (Target point of issued order)) Equal to 0.00
                            Then - Actions
                                Unit - Create 1 Dummy for Neutral Hostile at (Target point of ability being cast) facing Default building facing degrees
                                Unit Group - Pick every unit in (Units within 512.00 of (Position of (Last created unit))) and do (Unit - Explode (Picked unit))
                                Unit - Kill (Ordered unit)
                            Else - Actions
                                Do nothing
                    Else - Actions
                        Do nothing
            Else - Actions
                Do nothing
and for me the missile moves to the spot, however there is no units that die and it does not create the dummy unit. From what i can see it matches however ive got no idea why yours would explode and mine does not. Test something for me, delete the action that explodes the units and try out the trigger. Do the unit still die afterwards?

_________________
Image


Top
 Profile  
 
 Post subject: Re: [Help] With trigger
PostPosted: October 1st, 2012, 8:12 pm 
Offline
Member
User avatar

Joined: November 15th, 2008, 11:50 pm
Posts: 50
No, it does not work if I do that.

_________________
Image


Top
 Profile  
 
 Post subject: Re: [Help] With trigger
PostPosted: October 2nd, 2012, 7:46 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Well now, im not exactly sure what is going on then. As you said the distance is not 0 when it spawns so there should be no way that the trigger goes off..and by deleting that action and testing, it shows that there is nothing else going on but that trigger. Not only that, but the missile is still intact, so somehow the trigger is still firing off actions even when the conditions dont match, and even skipping some. I really don't know how you managed to do something like that. It may be best to just redo the trigger, than to figure out what is going on.

_________________
Image


Top
 Profile  
 
 Post subject: Re: [Help] With trigger
PostPosted: October 2nd, 2012, 9:23 am 
Offline
Member
User avatar

Joined: November 15th, 2008, 11:50 pm
Posts: 50
Is the condition I have set up even valid? I am thinking that for some reason the game just invalidates the condition I have set and the condition is automatically set to fulfilled and that is why it fires. If I get you the war3map.j file from the original version, could you tell me how it is set up in the original? I am going to try and delete the condition to see what happens.

_________________
Image


Top
 Profile  
 
 Post subject: Re: [Help] With trigger
PostPosted: October 2nd, 2012, 10:26 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
I made the same condition and it didn't go off for me, but perhaps that is due to other factors like the base spell used and such. You can upload the .j file and perhaps someone else can take a look and figure it out but unfortunately i know little to none jass so i wont be of much help in that aspect.

_________________
Image


Top
 Profile  
 
 Post subject: Re: [Help] With trigger
PostPosted: October 2nd, 2012, 10:23 pm 
Offline
Member
User avatar

Joined: November 15th, 2008, 11:50 pm
Posts: 50
I have attached the war3map.j file from the original map here. I need the trigger for the launch long range nuke ability, I cannot read JASS so I am requesting the help of someone who can.


You do not have the required permissions to view the files attached to this post.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)