Handheld Shield? (Solved)

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
MrToots
Posts: 77
Joined: Fri Sep 22, 2017 11:56 am
Contact:

Handheld Shield? (Solved)

Post by MrToots »

I know i say this alot but sorry if this is the wrong place, the topic I was gonna post this in was closed apparently(the How do I.. Thread)

I was wondering does anyone know how to make a shield that activates at the press of a button
i've seen it before but i can't remember what mod had it
the mod had a gun which if you held right click it put up an energy shield that negated damage coming from infront of you
i would like to do basically that but i am still new at decorate and and i can't find anything that points me in any logical direction

Edit: Solved - I used the Realm667 Shieldgun and just used the used one of the small actors, learned a good amount about positioning from it
Last edited by MrToots on Thu Dec 07, 2017 6:23 pm, edited 1 time in total.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Handheld Shield?

Post by Blue Shadow »

MrToots wrote:I know i say this alot but sorry if this is the wrong place, the topic I was gonna post this in was closed apparently(the How do I.. Thread)
I moved it to the right place. You can find out here why that thread was closed.
User avatar
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Re: Handheld Shield?

Post by Cherno »

MrToots wrote:I know i say this alot but sorry if this is the wrong place, the topic I was gonna post this in was closed apparently(the How do I.. Thread)

I was wondering does anyone know how to make a shield that activates at the press of a button
i've seen it before but i can't remember what mod had it
the mod had a gun which if you held right click it put up an energy shield that negated damage coming from infront of you
i would like to do basically that but i am still new at decorate and and i can't find anything that points me in any logical direction
I think BulletEye had this mechanic, where you could create a temporary energy shield. However, it was just a projectile-blocking actor that would exist in front of the player's position for a few seconds.
User avatar
ramon.dexter
Posts: 1519
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Handheld Shield?

Post by ramon.dexter »

One of the weapons in russian overkill has this mechanic. Also. realm667 has a kind of deployable shield (here with beacon actor that spawns the shield).
User avatar
MrToots
Posts: 77
Joined: Fri Sep 22, 2017 11:56 am
Contact:

Re: Handheld Shield?

Post by MrToots »

I actually noticed realm667 has 2 things that I'm gonna look through
The shield gun which I'm hoping is exactly how it sounds and the shield sphere which reflects projectiles both of which are interesting
I'll do some tests and see
User avatar
ramon.dexter
Posts: 1519
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Handheld Shield? (Solved)

Post by ramon.dexter »

So you should head for the russian overkill. One of the guns spawns shield in from of you.
User avatar
MrToots
Posts: 77
Joined: Fri Sep 22, 2017 11:56 am
Contact:

Re: Handheld Shield? (Solved)

Post by MrToots »

ramon.dexter wrote:So you should head for the russian overkill. One of the guns spawns shield in from of you.
I believe I know what you are referring to and it's not quite what I was looking for, if I'm right that places a stationary shield, what I require is something you have in your hands, something that will move with you as if it's an actual shield in your hand, and while it took some fidgeting i got the results i was looking for
Thanks though :)
User avatar
ramon.dexter
Posts: 1519
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Handheld Shield? (Solved)

Post by ramon.dexter »

Yes, the gun I'm reffering to is EXACTLY what you want. It spawns a shield wall in front of you that moves with you.

The stationary one is the item from realm667.
User avatar
DerTimmy
Posts: 99
Joined: Tue Aug 11, 2020 6:54 am
Contact:

Re: Handheld Shield? (Solved)

Post by DerTimmy »

what does the code look like? i have a gun with movable shield but cant figure out how to acticate/deactivate it with altfire :/ i need to hold altfire for it to appear. cant find it in RO
Jarewill
 
 
Posts: 1759
Joined: Sun Jul 21, 2019 8:54 am

Re: Handheld Shield? (Solved)

Post by Jarewill »

DerTimmy wrote:what does the code look like? i have a gun with movable shield but cant figure out how to acticate/deactivate it with altfire :/ i need to hold altfire for it to appear. cant find it in RO
I don't think it's a good idea to bump a 3 year old thread. It might have been better to post a new thread in the scripting forum. But what do I know.

As for your question: have the shield spawning as an overlay that you can activate and deactivate with A_Overlay:
Spoiler:
Post Reply

Return to “Scripting”