• 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.

[Trigger] Right Click detection

Status
Not open for further replies.
Level 25
Joined
May 11, 2007
Messages
4,650
I was just wondering how I can detect if a player right clicks (if it's possible) + save that location in a point variable.

Like:

Player 1 clicks on a place, then his cannon shoots a cannonball towards that location.

If it can be done without jass it would be nice.. As I don't know much jass at all.
 
Level 19
Joined
Sep 4, 2007
Messages
2,826
Ye, I thought that too. I have to have a unit that is ordered something, it couldn't just trigger by right clicking when having nothing selected?

That's not possible unless you inject DLL into your map making it unreadable as well as unplayable by the default WarCraft III Engine. You'll have to use a special launching tool for such a map like the WarSoc tool.
This also means you won't be able to play the map online.
 
Level 25
Joined
May 11, 2007
Messages
4,650
That's not possible unless you inject DLL into your map making it unreadable as well as unplayable by the default WarCraft III Engine. You'll have to use a special launching tool for such a map like the WarSoc tool.
This also means you won't be able to play the map online.

Okay. Well I just made it fire straight from the ship, and then use the slide trigger ways to make it move.

Any news on warsoc, when it'll be out?
 
Level 25
Joined
May 11, 2007
Messages
4,650
But why without anything selected? Can you perhaps describe a little better your system?

What I wanted was a spaceship that moves with the slidetriggers, it kinda works.

But then I also wanted to right click and it would fire to that position. Somehow my move orders made it turn before, but now it just continues in the direction it has. So I guess I could use the unit now.

EDIT: Does anyone know why this trigger doesn't allow the unit to turn?/Knows how to fix it, it's for an AI.

  • AI Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Add all units of (Units of type Fighter (In space, Computer)) to AISpaceshipsGroup1
      • Unit Group - Pick every unit in AISpaceshipsGroup1 and do (Actions)
        • Loop - Actions
          • Set tempPointAI1 = (Position of (Picked unit))
          • Set tempPointAI2 = (tempPointAI1 offset by 15.00 towards (Facing of (Picked unit)) degrees)
          • Unit - Move (Picked unit) instantly to tempPointAI2
          • Custom script: call RemoveLocation( udg_tempPointAI1 )
          • Custom script: call RemoveLocation( udg_tempPointAI2 )
      • -------- ---------------------------------------- --------
      • -------- ---------------------------------------- --------
      • Custom script: call RemoveLocation( udg_tempPointAI1 )
      • Custom script: call RemoveLocation( udg_tempPointAI2 )
 
Last edited:
Level 25
Joined
Jun 5, 2008
Messages
2,573
As i have discused earlier in my thread, it seems that the function to make a unit face angle/unit/point are slopy.
Therefore for example you can't make unit face a unit face an angle/unit/point instantly not even by moving it and making it face that angle.
You could try to increase the turn speed before you move the unit though, may work...
 
Level 25
Joined
May 11, 2007
Messages
4,650
As i have discused earlier in my thread, it seems that the function to make a unit face angle/unit/point are slopy.
Therefore for example you can't make unit face a unit face an angle/unit/point instantly not even by moving it and making it face that angle.
You could try to increase the turn speed before you move the unit though, may work...

It did work before, dunno what I did different. Turn speed.. Doesn't seem to work for me. But I'll test .
 
Status
Not open for further replies.
Top