• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

PvP Triggers?

Status
Not open for further replies.
Level 5
Joined
Jun 18, 2008
Messages
146
hey sidekick here,

I want to make a PvP for my ORPG, can anyone help/show me with triggers? Coz i've tried making one,\... but i failed :\! Can someone make it when you type -pvp (player number) and it makes them move to a region and treats just that player as a ENEMY? Can anyone give a map with it in?

thanx,

sidekick
 
Level 9
Joined
May 27, 2006
Messages
498
Use substrings.

  • PvP
    • Events
      • Player - Player 1 enters a message containing -pvp as Substring
    • Conditions
    • Actions
      • Set Player = (Player((Integer((Substring((Entered chat string), 5, 6))))))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by Player) and do Actions:
        • Unit - ...
      • Player - ...
This takes the entered string and finds the fifth and sixth letters and converts them into integers. So if you type -pvp 5, trigger will store yellow player into variable so you can refer to him easier.
 
Level 5
Joined
Jun 18, 2008
Messages
146
Use substrings.

  • PvP
    • Events
      • Player - Player 1 enters a message containing -pvp as Substring
    • Conditions
    • Actions
      • Set Player = (Player((Integer((Substring((Entered chat string), 5, 6))))))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by Player) and do Actions:
        • Unit - ...
      • Player - ...
This takes the entered string and finds the fifth and sixth letters and converts them into integers. So if you type -pvp 5, trigger will store yellow player into variable so you can refer to him easier.

can you show me ON a map please :D?
 
Level 9
Joined
May 27, 2006
Messages
498
Just make an if-then-else action, with condition if (entered chat string) equal to -pvp , then (Skip remaining actions) and display some message informing that you have to enter a number.

Or you could just make a condition: (Entered chat string) Not Equal to -pvp .at the trigger conditions.

But i suggest you to try to figure out solutions on your own, otherwise you wont learn how to make working triggers...
 
Status
Not open for further replies.
Top