• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Complicated Trigger Request

Status
Not open for further replies.
Level 10
Joined
Feb 22, 2008
Messages
619
Hello, I am making a map. I would like the unit [the only unit controlled by Player 1 (Red)] to be controlled by the arrow keys (Up=Up Down=Down Left=Left Right=Right Up+Right=Up Right Down+Left=Down Left etc.).
The other thing I want to do is have it so that when you right click it fires bullets (preferably crushing wave base ability) in a straight line from the point of the unit, in the direction towards the mouse, off the map (I can make the ability so please don't tell me how).
I also want it so that when you hold in right click it will stream the bullets (preferably one every 0.5 seconds the same way as the one bullet). If the streaming is impossible that's fine.
It would be appreciated if you put exact triggers onto a map or posted them here (Both are equally okay!), or in Script (but you would need to tell me how to use Script).
REP WILL BE GIVEN TO ONE AND ALL HELPERS! Thank you.
 
Well, first off, you cannot detect the right click release, but you can only detect the press of it.
So, to check that, you can do this:
  • Event0
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set Hashtable = (Last created hashtable)
  • Event1
  • Events
    • (You will decide the event here, it's after the hero selection trigger)
  • Conditions
  • Actions
    • --All actions concerning hero pick here
    • --Dummy creation--
    • Set Player_Group = (All players matching ((Matching Player) slot equal to Is Playing) and ((Matching Player) controller Equal to User))
    • For each (Integer A) from 1 to (Number of players in (Player_Group), do (Actions)
      • Loop - Actions
        • Set Temp_Point1 = (Position of (Load (Key(hero)) of (Key(Player(IntegerA))) from Hashtable)
        • Unit - Create 1 dummy for (Player(IntegerA)) at Temp_Point1 facing default building degrees
        • Hashtable - Save (Last created unit) as (Key(dummy)) of (Key(Player(IntegerA))) in Hashtable)
        • Custom script: call RemoveLocation (udg_Temp_Point1)
    • Custom script: call DestroyForce (udg_Player_Group)
    • Trigger - Turn on (Trigger <gen>)
  • Trigger
  • Events
    • Time - Every 1.00 seconds of game-time
  • Conditions
  • Actions
    • Set Player_Group = (All players matching ((Matching Player) slot equal to Is Playing) and ((Matching Player) controller Equal to User))
    • Player Group - Pick every player in (Player_Group) and do (Actions)
      • Loop - Actions
        • Set Point2 = (Position of (Load (Key(hero)) of (Key(Picked Player)) from Hashtable))
        • Unit - Move (Load (Key(dummy)) of (Key(Picked Player)) from Hashtable) to Point2
        • Custom script: call RemoveLocation (udg_Point2)
    • Custom script: call DestroyForce (udg_Player_Group)
  • Trigger1
  • Events
    • Unit - A unit is issued an order targeting a point
  • Conditions
    • (Issued order) Equal to (order(smart))
  • Actions
    • Set Point1 = (Target point of issued order)
    • Unit - Order (Load (Key(dummy)) of (Key(Triggering unit)) from Hashtable) to Undead Dreadlord - Carrion swarm (Point1)
    • Custom script: call RemoveLocation (udg_Point1)
Player units to be controlled by arrows, it's really done many times before, check these for more info and/or instant implementation:
[•] http://www.hiveworkshop.com/forums/spells-569/arrow-movement-system-v1-3-updated-148367/ (GUI version)
[•] http://www.hiveworkshop.com/forums/spells-569/advanced-arrow-key-movement-system-v1-2-0-a-103695/ (vJass version)
 
Status
Not open for further replies.
Top