HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Mass Tele Trigger Crashes Game

07-07-2005, 03:43 PM#1
MrApples
Ok, in WW3 people do thing called tping, where they teleport into your base, and then they declare, which isn't very fair play. I made a trigger to stop this, but unfortunately, it crashes the game.

TIME SET
Code:
DecideTp
    Events
        Unit - A unit Begins casting an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to Mass Teleport
                (Ability being cast) Equal to Item Town Portal
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Target unit of ability being cast)) Equal to (Owner of (Casting unit))
            Then - Actions
                Do nothing
            Else - Actions
                Wait 120.00 game-time seconds
                Set TpDecided = True

The ABOVE trigger is supposed to set a 2 minute limit on the time in which if the TPer declares the trigger will react.




MAIN TRIGGER
Code:
Anti Tp
    Events
        Unit - A unit Begins casting an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to Mass Teleport
                (Ability being cast) Equal to Item Town Portal
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Target unit of ability being cast)) Equal to (Owner of (Casting unit))
            Then - Actions
                Do nothing
            Else - Actions
                Wait until (TpDecided Equal to True), checking every 1.00 seconds
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Owner of (Casting unit)) is giving (Owner of (Target unit of ability being cast)) Alliance (non-aggression)) Equal to False
                    Then - Actions
                        Unit - Remove (Casting unit) from the game
                        Player - Add 5000 to (Owner of (Target unit of ability being cast)) Current gold
                        Game - Display to (Player group((Owner of (Target unit of ability being cast)))) for 30.00 seconds the text: Anti Tp has granted...
                        Game - Display to (Player group((Owner of (Target unit of ability being cast)))) for 30.00 seconds the text: Read |cff32cd32Fair...
                        Trigger - Turn off PlayerTp <gen>
                        Trigger - Turn on PlayerTp <gen>
                        Trigger - Turn off DecideTp <gen>
                        Trigger - Turn on DecideTp <gen>
                        Set TpDecided = False
                    Else - Actions
                        Set TpDecided = False

The ABOVE trigger does if the player declares within 2 minutes(what the bugged trigger is for) The owner of the target(the victim) will recieve 5000 gold and the hero that teleported them will be removed.

ALLY SET
Code:
PlayerTp
    Events
        Unit - A unit Begins casting an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to Mass Teleport
                (Ability being cast) Equal to Item Town Portal
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Target unit of ability being cast)) Equal to (Owner of (Casting unit))
            Then - Actions
                Do nothing
            Else - Actions
                Set OwnerTP = (Owner of (Casting unit))
                Set VictimTP = (Owner of (Target unit of ability being cast))
                Wait until ((OwnerTP is giving VictimTP Alliance (non-aggression)) Equal to False), checking every 1.00 seconds
                Set TpDecided = True
The ABOVE trigger detects if there is an unally between the 2 players.

UPDATE! I've Fixed the Crash right after tele thing! But Now, It Crashes when the declare is madeo_O !
07-07-2005, 05:57 PM#2
Anitarf
What are your triggers supposed to do? I can't make heads nor tails from them...

And, anyway, who ever said war was fair...
07-07-2005, 06:34 PM#3
MrApples
Added descriptions of what the triggers do
07-07-2005, 08:03 PM#4
Anitarf
Well, I don't have a clear idea why this would crash the game, but I have lots of ideas why it wouldn't work anyway even if it didn't crash the game.

Like, the fact that cast event responses are bugged and they may get reset during waits. Or, that you are using normal waits instead of polled waits. Or, that the player can just kill the other player in those 120 seconds, and then, right before the trigger would remove his hero, quickly set the alliance back. Why does the main trigger wait an additional 120 seconds before seting tpdecided to false again? And how is that in any way multi-instanceable, what happens if more players tp around at the same time, won't that just mess everything up?

I don't know what's the point, you have a game where people can change alliances freely, but you are worried about them not playing fair? Like, if that's a problem for you, lock the teams so players can't declare at all? Or just remove the TP abilities?
07-08-2005, 12:02 AM#5
MrApples
Quote:
Originally Posted by Anitarf
Well, I don't have a clear idea why this would crash the game, but I have lots of ideas why it wouldn't work anyway even if it didn't crash the game.

Like, the fact that cast event responses are bugged and they may get reset during waits. Or, that you are using normal waits instead of polled waits. Or, that the player can just kill the other player in those 120 seconds, and then, right before the trigger would remove his hero, quickly set the alliance back. Why does the main trigger wait an additional 120 seconds before seting tpdecided to false again? And how is that in any way multi-instanceable, what happens if more players tp around at the same time, won't that just mess everything up?

I don't know what's the point, you have a game where people can change alliances freely, but you are worried about them not playing fair? Like, if that's a problem for you, lock the teams so players can't declare at all? Or just remove the TP abilities?

Ok, it would run if the tper declared cause I have another trigger that sets it if the alliance is changed. TpDecided is also set when the alliance is changed.

Removing the tp abilities would take away from the game, I just don't want it done to fight cheaply.

What are polled waits? and why would that affect it?

its set to change it to false in 120 seconds because I wasn't thinking fully and that the first trigger is to set it to true in that time. I know I can do it by just turning on/off.
07-10-2005, 03:09 PM#6
MrApples
Anyone know what he means by Polled waits?
07-10-2005, 04:19 PM#7
Dead-Inside
Polled waits mean Wait (Game-Time), basically.

Before, when WC3 was fucking up badly (Long time ago) you only had the regular Wait in GUI, which wasn't accurate with more than one player in the game. So you had to work around it. Bitchy too.

Then Blizzard finally made the poll wait in the engine, the Wait (Game-Time). So that's what he means.
07-11-2005, 03:02 PM#8
MrApples
so adding polled waits might fix it :/
07-11-2005, 04:38 PM#9
MrApples
Updated Post! Game no longer crashes after ability is used, but instead crashes when the Tper declares.
07-11-2005, 04:48 PM#10
mogmiester
why not just change the targets allowed to only be able to target your own units? that means they would have to have a unit in your base, which you could deal with. I'm pretty sure you can change the targets allowed to your own units
07-12-2005, 05:44 PM#11
MrApples
Cause that would take away, why can't this trigger work instead? It happens now only if the player declares, but yet I can't figure it out...
07-13-2005, 03:26 PM#12
spirit_man
I did this but i might of been lag like ures might be, it teled 30 units to the caster thn set their life 2 50%..... no cooldown so i thought ill press it twice quick... crash
( I fixed this by putting cooldown lol )
07-13-2005, 09:40 PM#13
MrApples
cooldown? I didn't edit mass tele