How to make a Time Bomb?

Purification

New Member
Reaction score
3
Could anyone tell me how I could make something like a bomb which has a countdown, and the target of the bomb can pass the bomb to another enemy where the countdown will continue? How should I code that? Thanks for any help.
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
would it be similar to:
a.) pass the bomb
or
b.) c4 from counter strike.
 

Trithilon-V2

New Member
Reaction score
20
So if that will be an item...just use custom values...
The simplest trigger starts from here:-

Code:
Event - 
Unit acquires an item
Conditions - 
Item Type (Item Being maniputed) = Time Bomb
Actions - 
Item - Set Custom value = 5

Code:
Event - Every 1 second of game time

Actions -

Items pick all items on the map matching (Item is of type (Time Bomb) and Item is Owned = true)

If (custom value of item = 0)
then 
Item - Remove Item
Unit - Damage Target for X damage

This code is just a simple template...
Use timers to be accurate...I cant eaborate much cuz i am using a cell phone.
Gud Luck.
 

vaziocs

New Member
Reaction score
5
Could anyone tell me how I could make something like a bomb which has a countdown, and the target of the bomb can pass the bomb to another enemy where the countdown will continue? How should I code that? Thanks for any help.

theres a mini-game like this in uther party with the mortars.
just use any point-target ability then probably something like this
add the explode ability from sappers to all units(kaboom).

event unit starts the effect of an ability
//lets make the ability being storm bolt;
condition - ability = storm bolt

action- set "unit variable" = target point of ability being cast;
Unit - Add Storm Bolt to (Target unit of ability being cast) // here u add the ability to the bomb-target;
//HERE U CAN PUT A CONDITION TO REMOVE THE ABILITY SO ONLY 1 UNIT CAN USE THE ABILITY AT A TIME.
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Not Equal to fvunit Then - Actions
Unit remove ability storm bolt from picked unit
Else - Actions
Do nothing

trigger - turn on timer
trigger - run timer


trigger timer:
event - every 1 second
set timer = timer+1;
sound - play sound "tick"
wait 5 seconds;
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Equal to fvunit and timer =5 // timer needs to be 5 in condition also cause this will run every 1 second

Then - Actions
Unit - Order fvunit to Neutral - Kaboom! (Position of fvunit)
Else - Actions
Do nothing

set timer = 0;
trigger - turn this trigger off;

sound - play sound "tick"
**
change pick every units to ur condition
and the ability need to have a 4 second cooldown or something then the player only have 1 second to use it or something
 

Faust

You can change this now in User CP.
Reaction score
123
Have a dummy unit with an aura that targets only owner's own units, and when someone passes the bomb, change the ownership of the dummy
 

azareus

And you know it.
Reaction score
63
If we say that it is an ability then it could look like this:Timebomb
Code:
 Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Timebomb
    Actions
        Floating Text - Create floating text that reads You just used Timeb... above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        -------- Time should be set to the countdown time you want --------
        Set time = 0
        Floating Text - Change text of (Last created floating text) to (The bomb will explode in: + (String(time))) using font size 10.00
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top