[weapon][zscript] set stuff on fire (Edit: also deep freeze)

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
Post Reply
User avatar
kodi
 
 
Posts: 1355
Joined: Mon May 06, 2013 8:02 am

[weapon][zscript] set stuff on fire (Edit: also deep freeze)

Post by kodi »

I'm pretty happy with how the burning code for my project is turning out, so I decided to share it independently for general use. It is provided as a super shotgun that ignites enemies with stacking DOT damage and fire/smoke particles. Hint: The code in the bullet puff actor can easily be adapted for a projectile if you want to make a flamethrower :)

Zscript:
Spoiler:
TEXTURES:
Spoiler:
Screenshot:
Spoiler:
EDIT:
Here's the opposite of the former, a grenade (replaces rocket launcher projectile) that freezes enemies. It's supposed to be more or less compatible with any monster replacement. I would very much appreciate bug reports on this :)
Note: it is NOT compatible with the fire code above right now and will probably crash the game if you attempt combining them.
Attachments
freezegrenade.pk3
(3.98 KiB) Downloaded 154 times
Last edited by kodi on Wed Jan 11, 2017 5:35 am, edited 1 time in total.
MrJohnny
Posts: 212
Joined: Fri Aug 05, 2016 8:41 am

Re: [weapon][code] set stuff on fire

Post by MrJohnny »

Whenever I attempt to run it with GZDoom (even GZDoom 2.3.0, where ZScript is enabled by default), it throws the following error:

Code: Select all

Script error, "Firestarter.wad:DECORATE" line 1: Expected '{', got 'firestarter'.
User avatar
kodi
 
 
Posts: 1355
Joined: Mon May 06, 2013 8:02 am

Re: [weapon][code] set stuff on fire

Post by kodi »

You need to put in in a lump called (or included in) "zscript" rather than "decorate" :)
MrJohnny
Posts: 212
Joined: Fri Aug 05, 2016 8:41 am

Re: [weapon][code] set stuff on fire

Post by MrJohnny »

Yeah... I guess that makes sense. :P Just gave it a whirl - pretty neat stuff. I might just use this sometime. Thanks for sharing!

EDIT: after playing for around 2-3 minutes, the game crashes to the console with this message:

Code: Select all

called from WPHitActor. StateFunction. 1 at Firestarter.wad:ZSCRIPT, line 111
called from state WPHitActor. 1 in WPHitActor
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: [weapon][code] set stuff on fire

Post by Matt »

Thanks! This is really helpful in trying to learn the new zscript paradigm.

So any of these actors can be referenced in DECORATE, right?
User avatar
kodi
 
 
Posts: 1355
Joined: Mon May 06, 2013 8:02 am

Re: [weapon][code] set stuff on fire

Post by kodi »

Vaecrius wrote:Thanks! This is really helpful in trying to learn the new zscript paradigm.

So any of these actors can be referenced in DECORATE, right?
Glad it's of use!
I'm fairly certain you can spawn and compare these actors from DECORATE, but I've no idea what attempting inheritance will do.
MrJohnny
Posts: 212
Joined: Fri Aug 05, 2016 8:41 am

Re: [weapon][code] set stuff on fire

Post by MrJohnny »

Okay, I think you can pretty much ignore my previous post. It appears there was a typo somewhere (no typo of yours though, I have a bad habit of changing small things).
User avatar
kodi
 
 
Posts: 1355
Joined: Mon May 06, 2013 8:02 am

Re: [weapon][zscript] set stuff on fire (Edit: also deep fre

Post by kodi »

Updated the first post with a freeze grenade pk3. Any suggestions on code improvement/overhaul and bug reports (especially with custom monster types and other mods) is appreciated.
Post Reply

Return to “Resources”