Help Making a "Bomb"

Wark

Animal
Reaction score
27
Hey im just starting to make my Counter-Strike map, and i ned some help with the c4 (bomb)

I made it so when u enter a circle of power, a c4 appears next to you.

I need some help.

1. When the bomb is dropped in a region, a small Explosive Barrel is placed,
a countdown begins, if the bomb is not removed by the "Coutner Terrorists"
it blows up causing game over.

2. How to make it so there can be only 1 bomb in the game

3. How to make the bomb only useable and pickupable by the "Terrorists"

4. How to enable a one time use ability called "Plant Bomb"

This is going to be the biggest project in the game and il post other problems im having.
 
Q3:
A: well maybe you can make all the triggers that are enabled w/ the bomb with the condition that goes somethin like this:

triggering unit = to type of unit terrorist
 
Thats a good idea thx, but.. That still wont disable the Counter-Terrorists the ability to pick it up.
 
IM sure u made a c4 item..

Make a variable and call it Explosive and make it type item do #1
Make a variable of type integer and call it bomb and do number #2
1.
Code:
E: A unit begins casting an ability
C:Ability equal to C4 
A: if condition is true do Then, Else
   If- Bomb=Bomb +1
    Then- create C4 items at center of targeted point
    Else-Set Explosive=Last Created item

2. Make a variable of type integer and call it bomb and do this:
Code:
E: A unit finishes the effect of an ability
C: Ability equal to C4
A: Set Bomb=Bomb+1

3.
Code:
E: A unit aquires(or picks up) an item
C:Item equal to Explosive
A: If condition is true do Then, Else
   if- Triggering unit equal to (not terrorist)
   Then- Order triggering unit to drop last picked(or aquired) item
   Else-Do nothing
 
E: Unit aquires item
C: (Owner of(trigering unit)) = counter terriorest
A:
wait (0.10) gametime seconds
Item- move (item bieng manimpulated) to position of (trigering unit)
game - meaage player (you cannot use the enimys c4)

thats just a rough version to it would work if u foun the exact trigers
 
I couldent folow word for word, and i got this (havent tested it yet):

Code:
Trigger 1

E: Unit - A unit Begins casting an ability
C: (Ability being cast) Equal to Plant C4 
A: If (Bomb Equal to (Bomb + 1)) then do (Unit - Create 1 Detenated C4 for (Triggering player) at (Target point of ability being cast) facing (Position of (Triggering unit))) else do (Set Explosive = (Last created item))


Tigger 2

E: Unit - A unit Finishes casting an ability
C: (Ability being cast) Equal to Plant C4 
A : Set Bomb = (Bomb + 1)

Trigger 3

E: Unit - A unit Acquires an item
C: (Item being manipulated) Equal to Explosive
A: If ((Unit-type of (Triggering unit)) Not equal to Terrorist) then do (Unit - Order (Triggering unit) to drop (Item being manipulated) on (Triggering unit)) else do (Do nothing)


Variables: 
Bomb           Interger           0
Explosive      Item               None
 
For trigger three, is it a UNIT aquiring the item, or a HERO?

Triggering unit is usually a crappy choice. For items, if it's a hero, you typically use Hero Manipulating Item. However, if it IS a unit, then perhaps the Triggering Unit will work.

Your guess is as good as mine, but I've had trouble with Triggering unit before.
 
Create these variables:
HasBomb Boolean False
BombTime Timer Default
A dummy ability called drop bomb.
A item called bomb which is undroppable.
2 regions at your bomb plant area and at the bomb spawn area.

Use this for creating your bomb if a terrorist enter createbombregion:
Code:
    Events
        Unit - A unit enters (CreateBombRegion)
    Conditions
        HasBomb Equal to False
        (Unit-type of (Entering unit)) Equal to Terrorist
    Actions
        Item - Create Bomb at (Center of (CreateBombRegion))
        Set HasBomb = True

This for adding the Drop Bomb ability and destorying it if counterterrorists pick it up:
Code:
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Bomb
    Actions
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Unit-type of (Hero manipulating item)) Equal to CounterTerrorist
    Then - Actions
        Item - Remove (Item being manipulated)
        Countdown Timer - Pause (BombTime) as a One-shot timer that will expire in 30.00 seconds
        Countdown Timer - Destroy (Last created timer window)
        Set HasBomb = False
    Else - Actions
        Unit - Add Drop Bomb to (Hero manipulating item)
And this for dropping it:
Code:
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Drop Bomb
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (BombPlantRegion contains (Casting unit)) Equal to True
            Then - Actions
                Item - Remove (Item carried by (Casting unit) of type Bomb)
                Item - Create Bomb at (Center of BombPlantRegion))
                Countdown Timer - Start (BombTime) as a One-shot timer that will expire in 30.00 seconds
                Countdown Timer - Create a timer window for (BombTime) with title Detonation Time
            Else - Actions
                Game - Display to (All allies of (Owner of (Casting unit))) the text: Bomb can not be planted here.
And this for winning:
Code:
    Events
        Time - BombTime expires
    Conditions
    Actions
        Countdown Timer - Destroy (Last created timer window)
        Your victory actions

Wow that was a lot of work. You should be able to tell what the above code does and modify it to suit your purposes perfectly. You might have to use a few more variables(for the timer window, heros and the actual bomb) then I have.
 
Thx so much Jaz


And 1 more thing, is there a way to change it so a CT can't pick it up, he can only pick it up with his ability "Disable Bomb"?

And will that make it so there can be only 1 bomb in the whole game?

What do you mean by "undropable" like undrpable on death or undropable at all? :confused:
 
are you going to have casting time on "drop bomb" for whent hey are "setting up" the bomb
 
hmm good idea, i made a trigger that says "Planting Bomb..." and then "Bomb Planted" and I made the casting time like 10 seconds. Thx Grundy
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.
  • Ghan Ghan:
    That sounds like an adventure.
  • The Helper The Helper:
    400 users all online all looking at latest content

The Helper Discord

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top