• 🏆 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!

Gunbound?!

Status
Not open for further replies.
Level 2
Joined
Jan 3, 2005
Messages
19
Gunbound, a famous game. I am curently working on a project dubbed the name Gunbound after what its based off. I am having a serious problem with a flying unit.
There is NO tutorial that teaches this so do not flame. This is a unique problem. Ok, to start off, here is what should happen in steps.

1.) Player starts charging the system by pressing 'H'
2.) Player launchs projectil by pressing Esc
3.) Projectile is created above the unit fireing
4.) Projective is then increased in hight while ----------moving forward.
5.) (here is the trouble) Projectile hits max hight ------at halfway point between point A and point B.
6.) Where my issue comes in, is I cannot find a way------ to DROP the projectile back down when hitting-------- halfway point.
This is the trigger-----------------------------------======================================================
Trigger 1
Start1
Events
Unit - A unit Is issued an order with no target
Conditions
(Issued order) Equal to (Order(holdposition))
Power_TF[(Player number of (Owner of (Ordered unit)))] Equal to False
Actions
Set Unit = (Ordered unit)
Set Power_TF[(Player number of (Owner of (Ordered unit)))] = True
Set Playerfireing = (Owner of (Ordered unit))
Set Point[(Player number of Playerfireing)] = (Position of (Ordered unit))
Trigger - Turn on Charging <gen>
------------------------------------------------------======================================================

Trigger 2
Charging
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Power[(Player number of Playerfireing)] Less than or equal to 799
Then - Actions
Set Power[(Player number of Playerfireing)] = (Power[(Player number of Playerfireing)] + 10)
Else - Actions
Cinematic - Clear the screen of text messages for (Player group(Playerfireing))
Game - Display to (Player group(Playerfireing)) the text: (String(Power[(Player number of Playerfireing)]))
------------------------------------------------------======================================================

Trigger 3
FIRE
Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Power_TF[(Player number of (Owner of (Ordered unit)))] Equal to True
Actions
Set Power_TF[(Player number of (Owner of (Ordered unit)))] = False
Trigger - Turn off Charging <gen>
Unit - Create 1 Armour Bullet 1 for Playerfireing at Point[(Player number of Playerfireing)] facing Default building facing degrees
Set Bullet = (Last created unit)
Unit - Add a 15.00 second Generic expiration timer to Bullet
Set Hight = (Angle[(Player number of Playerfireing)] x ((Real(Power[(Player number of Playerfireing)])) / 15.00))
Set distance[(Player number of Playerfireing)] = (Power[(Player number of Playerfireing)] + ((Integer(Angle[(Player number of Playerfireing)])) x 2))
Set Destination = ((Position of Unit) offset by (Real(distance[(Player number of Playerfireing)])) towards (Facing of Unit) degrees)
Set HalfWayMark = (Region centered at ((Position of Bullet) offset by ((Real(distance[(Player number of Playerfireing)])) / 2.00) towards (Facing of Bullet) degrees) with size (100.00, 200.00))
Region - Center HalfWayMark on (Destination offset by ((Real(distance[(Player number of Playerfireing)])) / 2.00) towards ((Facing of Bullet) - 0.00) degrees)
Set Speed = ((Distance between (Position of Bullet) and Destination) / 4.00)
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Camera - Apply Camera 001 <gen> for (Picked player) over 0.00 seconds
Camera - Lock camera target for (Picked player) to Bullet, offset by (0.00, 0.00) using Default rotation
Unit - Set Bullet movement speed to Speed
Unit - Order Bullet to Move To Destination
Animation - Change Bullet flying height to Hight at (((Real(distance[(Player number of Playerfireing)])) / 2.00) + 1.00)
------------------------------------------------------======================================================

Trigger 4
Movement
Events
Unit - A unit enters Region 011 <gen>
Conditions
Actions
Animation - Change Bullet flying height to 0.00 at (((Real(distance[(Player number of Playerfireing)])) / 2.00) + 1.00)
------------------------------------------------------======================================================
Trigger 4 is just temportary as ive tryed to fix this in many ways, im sure the answer lies withen the Move Region command but i cannot figur out how it works. This is the first time ive used the GUI command Region-Move

To sum this up, the bullet goes up, but wont come back down.
Thanks for you help in the future, Astamonyana!
-Justin
 
Level 6
Joined
May 13, 2005
Messages
164
To create that is totally difficult and long if you want to do it and you need variables, and lots. Well, for me, if i was to make a Gunbound game, i would juz give the unit(vehicle) the warstomp and other non target abilities. When it uses the ability, it creates a Dummy unit that attacks ground a certain distance in front of the unit. Easy...
 
Level 2
Joined
Jan 3, 2005
Messages
19
Perhapts ive explained it wrong? I can make the unit move, all the math is done, (SUPER CALCULATER!) i just cant get the unit to fly up in the air and at halfway mark come back down, best ive come up with so far is to set a wait notion to distence / 60 and that gives me a triangularmotion up and down
but its not that complicated when you breka it down, its 3 parts.
1. Move the unit form point A to point B
2. Change hight to Var
3. Change hight to 0
4. Remove unit and do damage (optionaly not needed)
 
Status
Not open for further replies.
Top