Adding Quest-Marks for only One Player

Knights

You can change this now in User CP.
Reaction score
71
This trigger should work(I think...) but obviously somthing is wrong.

Code:
FloatingText2
    Events
        Time - Elapsed game time is 0.01 seconds
    Conditions
    Actions
        Custom script:   If GetLocalPlayer() == Player(1) then
        Special Effect - Create a special effect attached to the overhead of Villager (Male) 0002 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
        Custom script:   Endif


When Wc3 tries to compile it, it says: Line 12394: Expected a Code Statement, Line 12392: Expected a Code Statement.

Anyone know what the problem is?

Thanks,
Knights:cool:
 

Knights

You can change this now in User CP.
Reaction score
71
Thanks a lot, it works now...:)

Yeh, I knew that 0 would be the player 1 and player 2 would be 1, I have a separate one for a different unit for testing purposes..but anyways yes I knew that..:p

Thanks,
Knights:cool:
 

SFilip

Gone but not forgotten
Reaction score
634
It's kind of a bad idea to create a special effect (or any handle for that matter) for just one player.
I'd recommend this instead (s is a variable of type String):
Code:
FloatingText2
    Events
        Time - Elapsed game time is 0.01 seconds
    Conditions
    Actions
        Set s = <Empty String>
        Custom script:   if GetLocalPlayer() == Player(1) then
        Set s = Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
        Custom script:   endif
        Special Effect - Create a special effect attached to the overhead of Villager (Male) 0002 <gen> using s
        Set s = <Empty String>
Will achieve you the same effect (question mark only visible for a single player), but should be safer when it comes to desyncs.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top