Page 1 of 1

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

PostPosted: Sun Jan 08, 2017 1:31 pm
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.

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

PostPosted: Sun Jan 08, 2017 5:27 pm
by Pompous Seed
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 allExpand view
Script error, "Firestarter.wad:DECORATE" line 1: Expected '{', got 'firestarter'.

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

PostPosted: Sun Jan 08, 2017 5:42 pm
by kodi
You need to put in in a lump called (or included in) "zscript" rather than "decorate" :)

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

PostPosted: Sun Jan 08, 2017 5:47 pm
by Pompous Seed
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 allExpand view
called from WPHitActor. StateFunction. 1 at Firestarter.wad:ZSCRIPT, line 111
called from state WPHitActor. 1 in WPHitActor

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

PostPosted: Mon Jan 09, 2017 6:04 pm
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?

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

PostPosted: Mon Jan 09, 2017 6:59 pm
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.

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

PostPosted: Mon Jan 09, 2017 8:10 pm
by Pompous Seed
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).

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

PostPosted: Wed Jan 11, 2017 6:38 am
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.