• 🏆 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!

[Trigger] Why does this trigger cause server splits?

Status
Not open for further replies.
Level 8
Joined
Jan 16, 2008
Messages
156
This trigger is extremely simple, why does it cause server splits?

Here it is:

Code:
Glaive
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Piercing Glaive 
    Actions
        Unit - Create 1 Glaive for Player 7 (Green) at (Position of (Triggering unit)) facing Default building facing degrees
        Unit Group - Order (Units of type Glaive) to Attack Once (Target unit of ability being cast)
        Wait 2.00 seconds
        Unit Group - Pick every unit in (Units of type Glaive) and do (Unit - Remove (Picked unit) from the game)


Additional Info: The Glaive unit is based on the Huntress has 0 collision, a 10 second attack cooldown, 1000 range, bounce hits 5 enemies with 10% reduction, 0 movespeed, and .10 turn rate, no shadow, has the abilities invisible, locust and invulnerable, and uses the chain.mdl. Could any of this be the problem?
 
Level 6
Joined
Oct 31, 2008
Messages
229
I'm not excactly sure what you mean with server split, but instead of picking every unit of type glaives, you should better do this. pick every unit in the map, check if its a glaive and then remove it from the game. For the rest info, i dont see why it should cause any problem (except if u use a very old computer).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,232
They are understood. They occur when the game goes OOS for some players resulting in the game not being the same for each players. This means that units can be dead on one person's PC but alive on another. Bots can prevent the drop but normal hosts will auto disconnect the OOS people based on the host's session. Anyway it is not fesible to resync an OOS game in WC3.

Anything that can influence net traffic affected parts of WC3 will cause a split if used impropperly like locally.
 
Level 2
Joined
Sep 3, 2007
Messages
5
I think you can use a local unit to remove the glaive you've created. So you don't have to use the actions pick every unit in unit group (which i think may cause the lag.
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Piercing Glaive
    • Actions
      • Custom script: local unit glaive
      • Unit - Create 1 Glaive for Player 7 (Green) at (Position of (Triggering unit)) facing Default building facing degrees
      • Custom script: set glaive = GetLastCreatedUnit()
      • Custom script: call IssueTargetOrderBJ( glaive, "attack", GetSpellTargetUnit() )
      • Wait 2.00 seconds
      • Custom script: call RemoveUnit( glaive )
      • Custom script: set glaive = null
I've just seen what Dr Super Good said. so does it means my answer isn't correct?
 
Level 11
Joined
May 31, 2008
Messages
698
Just create the glaive then order (Last created unit) to attack the target and give (Last created unit) an experation timer. You dont have to remove it from the game. If you really want to you can make a different trigger.
A unit dies
unit is glaive
remove triggering unit from game
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,232
There is a difference between running code locally and using a local, one is a state in which code is executed the other is a variable system. Locals are safe to use and will not cause splits, executing code locally with use of the GetLocalPlayer() native or poor use of sync natives will.
 
Status
Not open for further replies.
Top