[CODE] spawning many warping actors in a pattern - New Demo

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Post Reply
User avatar
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

[CODE] spawning many warping actors in a pattern - New Demo

Post by scroton »

This is test/example code for spawning warping actors that adhere to a static pattern. Right now it's just a line that is in front of the player and extends upwards and outwards but it can be used for any number of more complex spawning patterns, from curves to structures around the player, etc. It uses a linear bezier curve to calculate the user vars the warping actors use for their warping, but any continuous function employed in a similar manner would work.

There is a test fist weapon given to the player and selected upon level entry. The primary fire spawns warping actors in the described linear pattern. The altfire spawns non-warping actors in the same described linear pattern for comparison.

ZDoom only.

Free to use for anything as long as credit is given.

Credits:

Ijon Tichy
--commonFuncs.h used in acs

InsanityBringer
--Linear increment spawn code from BlasterPistol.wad served as inspiration.

Other
--Electric arc sprites (all SARC sprites) edited from Doom plasma shot by scroton
--Code by scroton

FILE:
https://drive.google.com/file/d/0BxbbtK ... sp=sharing
Last edited by scroton on Wed May 13, 2015 4:29 pm, edited 1 time in total.
User avatar
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

Re: [CODE] spawning many warping actors in a pattern

Post by scroton »

While I'm sure others have thought of this before, I just wanted to share some code I wrote to test if a whip made of actors that wouldn't lag when the player moves was possible.

It's also worth noting that if you kept the actors around for longer than 1 tic and stored their tids in an array instead of wiping them after they're spawned you could update each of their user vars and thus animate them according to a function or even by hand-picked values if you wanted, with the between-frames animated too thanks to the wonderful, magic gift to the ZDoom community that is A_Warp.
User avatar
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

Re: [CODE] spawning many warping actors in a pattern

Post by scroton »

Since I've got this in a releaseable state (for a test version) now, here it is:

https://drive.google.com/file/d/0BxbbtK ... sp=sharing

This is a whip for another person's WIP Castlevania mod/possibly TC. It uses the animation method described above.

Anybody can use it for anything, check the ABOUT&CREDITS.txt file in the pk3 for more info.
Note that this method for animating a bunch of actors could be used for anything, not just a whip.
Feel free to ask questions about the code here or on irc.
Post Reply

Return to “Script Library”