I understand what you're saying but what i dont get is i've been asked 10000 times how i get my games to play so smooth on bnet and i finally give out some triggers and i get this type of response? lol. It works, you can use it how you want but this is how i use it and it works 100% fine.
the second if in the first trigger is sensless.
the movementspeed can be increased by triggers, too.
also: is the trigger only for player 1 or why do u use a fixed array
index? :)
greez
<</quote>>
I use a fixed array because its a class based map, when u choose a certain class differant triggers are switched on and off depending on what class you use.
My baneling for the bomberman map use the same mechanics. But rather
than use hitbox as region and you have to move the region around, i use
auto cast abilities on the projectile unit itself. Which works even
better.
<</quote>>
I have hitboxes attached to each and every zombie on the map, which moves the region with them :)
With the performance success of Hotel vs Zombies i figured i would share how i made the shooting so smooth. As many people know i am a trigger whore, i do not like to use the data editor for in depth things. So, i made a projectile system from the trigger editor and of course, it works perfectly!
Alot of people have been asking me for some of my code and until now i never really share anything but the way i see it is. I am tired of making 12893719387 maps because no one else is making the type of maps i am for some reason. So, ill give people a boost here and hopefully i can play some fun content i could have made but didnt have to thanks to the creativity and time of others :)
Here is a sample of how i did it.
*Firing Projectiles*
P1 Engineer Rocket Launcher
Events
UI - Player 1 clicks Right mouse button Down.
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Played Controlled Unit[1] Energy (Current)) >= 20.0
Then
Unit - Set Played Controlled Unit[1] Energy to ((Played Controlled Unit[1] Energy (Current)) - 20.0)
Unit - Pause Played Controlled Unit[1]
Unit - Make Played Controlled Unit[1] face (Current camera yaw of player 1) over 0.0 seconds
Animation - Play Attack Right animation for (Actor for Played Controlled Unit[1]) as Default, using Non Looping, Model Driven Looping options and Default Time blend time
Sound - Play Immortal_AttackLaunch (1) for (All players) on Played Controlled Unit[1] with Z offset 0.0 (at 100.0% volume, skip the first 0.0 seconds)
Unit - Create 1 SCV for player 1 at ((Position of Played Controlled Unit[1]) offset by 1.0 towards (Facing of Played Controlled Unit[1]) degrees) using default facing (No Options)
Unit - Set forced status bar state on (Last created unit) to Off
Unit - Turn (Last created unit) Status Bar state Off
Unit - Order (Last created unit) to ( Move targeting ((Position of Played Controlled Unit[1]) offset by 20.0 towards (Facing of Played Controlled Unit[1]) degrees)) (Replace Existing Orders)
Unit - Unpause Played Controlled Unit[1]
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Played Controlled Unit[1] Energy (Current)) < 20.0
Then
Sound - Play Alert_TerranNotEnoughEnergy (1) for Player 1 (at 100.0% volume, skip the first 0.0 seconds)
UI - Display "Not Enough Energy!!" for Player 1 to Directive area
General - Wait 2.0 Real Time seconds
UI - Clear Directive Messages for Player 1
Else
*How to detect collision of projectiles*
Projectile Collision (Rocket Launcher)
Events
Unit - Any Unit Enters _______ (Insert Region aka Hit box here)
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Triggering unit)) == 1
(Unit type of (Triggering unit)) == SCV
Then
Environment - Create a Large Terran explosion at (Position of (Triggering unit))
Environment - Deal damage using Raven - Seeker (Damage) on (Unit attached to (Triggering region)) from Played Controlled Unit[1] with 0.0 extra damage
Unit - Kill (Triggering unit)
All you have to do is change the models for the SCV (Projectile) and increase its movement speed :).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@Mille25
I understand what you're saying but what i dont get is i've been asked 10000 times how i get my games to play so smooth on bnet and i finally give out some triggers and i get this type of response? lol. It works, you can use it how you want but this is how i use it and it works 100% fine.
<<quote 198292>>
the second if in the first trigger is sensless.
the movementspeed can be increased by triggers, too.
also: is the trigger only for player 1 or why do u use a fixed array
index? :)
greez
<</quote>>
I use a fixed array because its a class based map, when u choose a certain class differant triggers are switched on and off depending on what class you use.
<<quote 198286>>
My baneling for the bomberman map use the same mechanics. But rather
than use hitbox as region and you have to move the region around, i use
auto cast abilities on the projectile unit itself. Which works even
better.
<</quote>>
I have hitboxes attached to each and every zombie on the map, which moves the region with them :)
<<quote 198297>>
@Mille25: Go
He probably not copy its from the actual map :P, who wants that.
<</quote>>
I did copy it from the actual map, that is only one players trigger for one weapon. The second if then is not useless as the projectiles use energy.
With the performance success of Hotel vs Zombies i figured i would share how i made the shooting so smooth. As many people know i am a trigger whore, i do not like to use the data editor for in depth things. So, i made a projectile system from the trigger editor and of course, it works perfectly!
Alot of people have been asking me for some of my code and until now i never really share anything but the way i see it is. I am tired of making 12893719387 maps because no one else is making the type of maps i am for some reason. So, ill give people a boost here and hopefully i can play some fun content i could have made but didnt have to thanks to the creativity and time of others :)
Here is a sample of how i did it.
*Firing Projectiles*
P1 Engineer Rocket Launcher
Events
UI - Player 1 clicks Right mouse button Down.
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Played Controlled Unit[1] Energy (Current)) >= 20.0
Then
Unit - Set Played Controlled Unit[1] Energy to ((Played Controlled Unit[1] Energy (Current)) - 20.0)
Unit - Pause Played Controlled Unit[1]
Unit - Make Played Controlled Unit[1] face (Current camera yaw of player 1) over 0.0 seconds
Animation - Play Attack Right animation for (Actor for Played Controlled Unit[1]) as Default, using Non Looping, Model Driven Looping options and Default Time blend time
Sound - Play Immortal_AttackLaunch (1) for (All players) on Played Controlled Unit[1] with Z offset 0.0 (at 100.0% volume, skip the first 0.0 seconds)
Unit - Create 1 SCV for player 1 at ((Position of Played Controlled Unit[1]) offset by 1.0 towards (Facing of Played Controlled Unit[1]) degrees) using default facing (No Options)
Unit - Set forced status bar state on (Last created unit) to Off
Unit - Turn (Last created unit) Status Bar state Off
Unit - Order (Last created unit) to ( Move targeting ((Position of Played Controlled Unit[1]) offset by 20.0 towards (Facing of Played Controlled Unit[1]) degrees)) (Replace Existing Orders)
Unit - Unpause Played Controlled Unit[1]
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Played Controlled Unit[1] Energy (Current)) < 20.0
Then
Sound - Play Alert_TerranNotEnoughEnergy (1) for Player 1 (at 100.0% volume, skip the first 0.0 seconds)
UI - Display "Not Enough Energy!!" for Player 1 to Directive area
General - Wait 2.0 Real Time seconds
UI - Clear Directive Messages for Player 1
Else
*How to detect collision of projectiles*
Projectile Collision (Rocket Launcher)
Events
Unit - Any Unit Enters _______ (Insert Region aka Hit box here)
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Triggering unit)) == 1
(Unit type of (Triggering unit)) == SCV
Then
Environment - Create a Large Terran explosion at (Position of (Triggering unit))
Environment - Deal damage using Raven - Seeker (Damage) on (Unit attached to (Triggering region)) from Played Controlled Unit[1] with 0.0 extra damage
Unit - Kill (Triggering unit)
All you have to do is change the models for the SCV (Projectile) and increase its movement speed :).