Spell / Keystroke Event Toss

Craigimus

New Member
Reaction score
0
Im trying to make a trigger / spell / anything that can result in like a ring toss ?

where you need to swing it around and toss it at the right time to throw it as far as you can depending on how fast you spin it.

also to determine how far you throw it to show as a score.

Any ideas on how that would work lol XD im completly blank about it.
 

Caedin88

New Member
Reaction score
1
I'd try this... 4 triggers to build / swing the ring.

Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) Presses the Left Arrow key
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        Set SPEED = (SPEED + 5)
        Trigger - Turn on Untitled Trigger 001 Copy <gen>

Code:
Untitled Trigger 001 Copy
    Events
        Player - Player 1 (Red) Presses the Down Arrow key
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        Set SPEED = (SPEED + 5)
        Trigger - Turn on Untitled Trigger 001 Copy 2 <gen>

Code:
Untitled Trigger 001 Copy 2
    Events
        Player - Player 1 (Red) Presses the Right Arrow key
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        Set SPEED = (SPEED + 5)
        Trigger - Turn on Untitled Trigger 001 Copy 3 <gen>

Code:
Untitled Trigger 001 Copy 3
    Events
        Player - Player 1 (Red) Presses the Up Arrow key
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        Set SPEED = (SPEED + 5)
        Trigger - Turn on Untitled Trigger 001 <gen>

1 Trigger to slow speed over time, so the faster they press the buttons the faster the increase. Uses a % to make it be harder to increase it the faster its going.
Code:
Untitled Trigger 001 Copy 3 Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set SPEED = (Integer(((Real(SPEED)) - ((Real(SPEED)) / 10.00))))
        Game - Display to (All players) the text: (String(SPEED))


1 Trigger to release the ring / also add a bonus of 50 to speed if the ring was released when the up arrow was the next key.

Code:
Untitled Trigger 001 Copy 3 Copy 2
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
    Actions
        Trigger - Turn off Untitled Trigger 001 Copy 3 Copy <gen>
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Untitled Trigger 001 Copy 3 <gen> is on) Equal to True
            Then - Actions
                Set SPEED = (SPEED + 50)
            Else - Actions

I tried this just now and I wasn't able to get it over 300.
 

Craigimus

New Member
Reaction score
0
i dont quite understand how you did all of that lols xD

is the Speed variable Real ? or Integer ? or a String ?

I've an idea on how i want it to look like there will be a person in the center of some marble terrian and to start it uses a skill called chain wrap which will wrap a chain around a certain object and as it spins the object thats chain wraped will go around in a circle as the buttons up down left right are pushed and to let go press a hotkey that the person skill has which will let it go and if up is last pressed button then hotkey it will toss the object over a graveyard.

i just need to determine how far the object was thrown and how i would trigger it all up lols xD

i seem to be asking alot but it sounds kool in the end xD
 

Caedin88

New Member
Reaction score
1
i dont quite understand how you did all of that lols xD

is the Speed variable Real ? or Integer ? or a String ?

I've an idea on how i want it to look like there will be a person in the center of some marble terrian and to start it uses a skill called chain wrap which will wrap a chain around a certain object and as it spins the object thats chain wraped will go around in a circle as the buttons up down left right are pushed and to let go press a hotkey that the person skill has which will let it go and if up is last pressed button then hotkey it will toss the object over a graveyard.

i just need to determine how far the object was thrown and how i would trigger it all up lols xD

i seem to be asking alot but it sounds kool in the end xD

I really like the idea, by the way SPEED in my test was an integer variable but a real would work just as well, and you could cut out the conversions to integer in one of the triggers. As for the graphics, I saw somthing a few seconds ago that could be useful...http://www.youtube.com/watch?sitesea...&v=wiwy6-wGj-Y, this video ( not my creation ) will tell you how to spin things around an object, so in the video the guy triggers the real variable to be

Variable = Variable - 4 every .03 seconds

If you want to base your graphics on the value of the SPEED variable you could change it to somthing like this

Variable = Variable - 3*ConversionReal2Integer(SPEED/100.00)

so say you have a speed of 250 then your variable would do the following

Variable = Variable - (3*2.5)
AKA Variable = Variable - 7.5

Which will cause it to spin faster than if it your speed was at 100 lets say.

Variable = Variable - (3*1.0)
AKA Variable = Variable - 3.0

I havn't tested this but I really like the idea and will test it in a second, if I get it all working ill upload what i've made for you.
 

Caedin88

New Member
Reaction score
1
I made a little demo map to show you what I mean...

Cast the spell once to start the throw, cast it again to release the wisp. The faster you are spinning when u release the wisp the farther it will go, theres a flat bonus on speed thus distance for releasing the wisp when UP is the next button to be pressed.

If you want to adapt this to be like Did you throw X object over the wall? you can remove the MoveWisp2 trigger and replace it with a trigger that checks speed at the time of release and if speed is over some value ( based on walls height ) then you can run an animation with the object going over or hitting the wall depending on what the speed was at the time of release.

EDIT: I have updated the map a little, Open the map in WE and goto Triggers -> Map Init to change the values on the following
1. How far the chain is that you swing your wisp by.
2. How far the throw goes. High numbers go less distance.
3. How much each keypress increases your speed. High numbers make the wisp faster.
4. Enemies True = yes enemies spawn, False = no enemies don't spawn.

EDIT: Wisp should now bounce off walls at a 45 degree angle.
 

Craigimus

New Member
Reaction score
0
Omg thats awesome xD

Though i need to change the distance from the wisp chin to the unit to be closer

and the distance of throwing the unit to be shortened as well how would i go about changing that ? xD

And if it hits a wall to make it kind of bounce off it ? slowly its speed instead of dissappearing.
 

Attachments

  • SpinToss1.w3x
    34.7 KB · Views: 117

Craigimus

New Member
Reaction score
0
I uploaded ur map but i changed something to show you what im trying to do

the area there is like a little ground distance and throwing the wisp as far as u can (making the distance you can throw the wisp limited to that are) also adding an arc to it if its possible to show that its in the air and if it hits the wall to slow it down also hitting the ground to slow it down as well.


EDIT Okies i got the speed and things in order

just need the air changing to go up when it starts and as it slows down to move down to the ground again. and locking the camera onto the unit being thrown so it follows it and is there a way to make the unit thats throwing move to a different place after the object has been thrown ?

hope im not asking to much xD
 

Caedin88

New Member
Reaction score
1
Here add what you want to this new version, it has more stuff and would be easier to work with.

Yeah no prob, most of that stuff is doable give me a little time to figure it out, in the meantime... set up everything like you want on this map im posting here, change speed and everything so you get it like you want, then ill see if i can add the other stuff.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
I have a comment on this map: The trigger is good but not the follow through. You can move while the chain spins, and if you move while it's thrown it goes faster, or comes towards to you because it's still linked to you.
 

rover2341

Is riding a roller coaster...Wee!
Reaction score
114
Trigger - Turn off (This trigger)
?? sorry i was just reading throw the post... Why did you add this?
 

Caedin88

New Member
Reaction score
1
I have a comment on this map: The trigger is good but not the follow through. You can move while the chain spins, and if you move while it's thrown it goes faster, or comes towards to you because it's still linked to you.

This is fixed in the lastest posting. I changed the move unit instantly to point to be related to the wisp itself and not the caster. Thus once you throw it you can move however you want, it shouldn't effect the wisp, although i replaced the warden with a tower because i was getting wierd glitches with the warden trying to run to fight mobs while swingin the wisp.
 

Caedin88

New Member
Reaction score
1
Trigger - Turn off (This trigger)
?? sorry i was just reading throw the post... Why did you add this?

I assume you are referencing the 4 UP DOWN LEFT and RIGHT triggers, this is because you have to press them in the right order UP -> LEFT -> DOWN -> RIGHT -> UP in order for it to work, otherwise you could just mash the UP key and it would spin, which doesnt make sense because you are supposed to be spinning.
 

Craigimus

New Member
Reaction score
0
Ok :) thanks for all your help

ive done the speed and throwlength so it goes the way i want and all of that

thanks again :)

looking forward to getting this part of my map done :D lol so i can start the next
which ill probs end up needing help with as well lol but ill give it a go b4 i ask.
 

Caedin88

New Member
Reaction score
1
Can you post the map with all the updated variables set like you want, I want to try creating the other stuff with everything else already setup like you want.
 

Craigimus

New Member
Reaction score
0
Okies i just posted it here ^^
i added the little area and changed the speed and stuff jsut quickly and yea.
 

Attachments

  • SpinToss2.w3x
    34.9 KB · Views: 103
General chit-chat
Help Users
  • No one is chatting at the moment.

      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