[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!

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

Postby kodi » Sun Jan 08, 2017 1:31 pm

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 93 times
Last edited by kodi on Wed Jan 11, 2017 6:35 am, edited 1 time in total.
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013

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

Postby Pompous Seed » Sun Jan 08, 2017 5:27 pm

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'.
Pompous Seed
 
Joined: 05 Aug 2016

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

Postby kodi » Sun Jan 08, 2017 5:42 pm

You need to put in in a lump called (or included in) "zscript" rather than "decorate" :)
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013

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

Postby Pompous Seed » Sun Jan 08, 2017 5:47 pm

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
Pompous Seed
 
Joined: 05 Aug 2016

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

Postby Matt » Mon Jan 09, 2017 6:04 pm

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
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

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

Postby kodi » Mon Jan 09, 2017 6:59 pm

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.
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013

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

Postby Pompous Seed » Mon Jan 09, 2017 8:10 pm

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).
Pompous Seed
 
Joined: 05 Aug 2016

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

Postby kodi » Wed Jan 11, 2017 6:38 am

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.
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013


Return to Resources

Who is online

Users browsing this forum: No registered users and 0 guests