How to kill on a button press?

Kalder

New Member
Reaction score
1
Ok so i am working on this GH(Guitar Hero), Or Rock band Themed Wc3 map where units run at you to the tune of whatever song you choose. So, what i want to know is how do you make it so when u hit a button it kills a unit in a region?. how do i make it so for example you have 1 button pressed down for example lets say G for green and then you press down the strum button for example S if u have just the green pressed down and it is not a special note then the unit does not die and you lose 1 gauge unit but if you hold down the Green button and then press the strum button the unit in the region dies, but also if you do this and there is no unit in the region then it will deduct 1 point of some kind from a meter or gauge that when there are 0 units in the Region of the gauge that you are defeated or fail.

Thanks for any information given.:thup::):thup:

P.S i Know this is kindof long so thank you for helping if you can :) :):):):thup:
 

Sevion

The DIY Ninja
Reaction score
413
Without RtC:

Create a building with units:

Guitar (building) that "builds":

Green Fret, Red Fret, Yellow Fret, Blue Fret, Orange Fret.

Add corresponding build hotkeys.

Then, have triggers detecting them being built. Force UI Cancel to stop making the unit and run your trigger.

OR, via RtC (vJASS):

Use User-Input natives.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, it gets a bit tricky if you need to use "custom" keys like that...

Can't satisfy with the arrow keys ? :eek:
 

Kalder

New Member
Reaction score
1
How?

what does having the building build the unit on a hotkey then having it cancel it do?

@Komaqtion I don't think that would work well because well there should be 5 buttons and there are only 4 arrow keys and also it would be more like DDR of used arrow keys :):rolleyes:
 

Sevion

The DIY Ninja
Reaction score
413
You have the event that registers a unit being trained. Then, in the actions, cancel the unit and do your kill units in whatever region.
 

Kalder

New Member
Reaction score
1
O ok :)

Thank you i assume that would work and thank you for explaining it to me more clearly +rep :) one question what is RtC?
 

bLu3_eYeS

New Member
Reaction score
31
RtC = Reinventing the Crafting / Reventing the Craft
I don't really know what it is usefull for.
 

SineCosine

I'm still looking for my Tangent
Reaction score
77
But if you do use RtC, won't the people who play your map have to use RtC as well? o.0
 

Komaqtion

You can change this now in User CP.
Reaction score
469
It's called "Reinvetning the Craft" :p And yes, all who play needs to have it, because you need to start their "special" wc3.exe (Called "launcher.exe") to be able to use the natives.

And RtC is useful because you can register the press and release events of any key on the keyboard...
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top