[ACS] Dropping a flag via script?
- FranckyFox2468
- Forum Regular
- Posts: 180
- Joined: Sat May 07, 2016 8:30 pm
[ACS] Dropping a flag via script?
Hey, just wanted to drop a little question like that. Is it possible to make an item (like a powerup) make the player drop a currently held CTF flag and perhaps forbidding a flag to be picked up for as long as said item is in the inventory?
Basically what i am trying to recreate is a similar effect to perhaps tf2's bonk soda or an ubercharge where invincibility makes the player drop a flag to avoid unfair advantage.
Basically what i am trying to recreate is a similar effect to perhaps tf2's bonk soda or an ubercharge where invincibility makes the player drop a flag to avoid unfair advantage.
[ACS] Re: Dropping a flag via script?
I don't think that's possible but I could be wrong, never messed with those before.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
[ACS] Re: Dropping a flag via script?
Whenever you pickup the powerup, you could call A_DropItem (or have the powerup execute a script that drops the item, your call) and just drop the flag if the player is holding one. The problem you might run into is how the gamemode will behave if you do drop the flag outside how a flag is typically dropped. It might act as accordingly or it might just mess up entirely, not sure.
<Dynamo_>uh
<Dynamo_>did you just take the thread away
<FusedQyou>Dunno
<FusedQyou>ask the thread
<Dynamo_>did you just take the thread away
<FusedQyou>Dunno
<FusedQyou>ask the thread
- Combinebobnt
- Retired Staff / Community Team Member
- Posts: 1893
- Joined: Mon Jun 04, 2012 3:37 am
- Location: Erth
- Contact:
[ACS] Re: Dropping a flag via script?
Make your own flag and don't use some carnevil inflexible hardcoded shit. This is what deathball is all about (you can shoot the ball(flag) at other ppl!!!).
SUPERFAST: DUEL DM CTF DOM
Zdoomwars Kosher Maps
Naturemod LMS
- FranckyFox2468
- Forum Regular
- Posts: 180
- Joined: Sat May 07, 2016 8:30 pm
[ACS] Re: Dropping a flag via script?
What's wrong with carnevil's stuff?Combinebobnt wrote:Make your own flag and don't use some carnevil inflexible hardcoded shit. This is what deathball is all about (you can shoot the ball(flag) at other ppl!!!).
Also i'm mainly asking cause i intend to maybe have some characters with temporary invincibility and i don't want them to just run away with the flag without being able to be stopped.
[ACS] Re: Dropping a flag via script?
It's hardcoded (and coded terribly) mess. I've spent years of my modding just working around shit he hardcoded just to achieve trivial things like the one you're asking for in this thread.FranckyFox2468 wrote:What's wrong with carnevil's stuff?Combinebobnt wrote:Make your own flag and don't use some carnevil inflexible hardcoded shit. This is what deathball is all about (you can shoot the ball(flag) at other ppl!!!).
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
- FranckyFox2468
- Forum Regular
- Posts: 180
- Joined: Sat May 07, 2016 8:30 pm
[ACS] Re: Dropping a flag via script?
...i just realized tho, if you use a custom built flag, how do you handle the announcer and the game telling everyone the flag has been taken?Combinebobnt wrote:Make your own flag and don't use some carnevil inflexible hardcoded shit. This is what deathball is all about (you can shoot the ball(flag) at other ppl!!!).
[ACS] Re: Dropping a flag via script?
The flag will have to inherit from CustomInventory, which will enable you to have a Pickup state label in its decorate which gets executed when the item is picked up. Then from the Pickup state you can call an ACS script to announce and manage things, etc.
[ACS] Re: Dropping a flag via script?
You can also use the Inventory.PickupAnnouncerEntry property to play an announcer sound entry when the item is being picked up by the player. For example, if you define custom flag items for the blue and red teams, you would use the entries "blueflagtaken" and "redflagtaken" respectively.
Code: Select all
Actor CustomBlueFlag : Inventory // Flag item for the blue team.
{
Inventory.PickupAnnouncerEntry "blueflagtaken"
}
Actor CustomRedFlag : Inventory // Flag item for the red team.
{
Inventory.PickupAnnouncerEntry "redflagtaken"
}