[Code] NS's Random Code Stuff

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.
User avatar
Xtyfe
Posts: 1480
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: [Code] NS's Random Code Stuff

Post by Xtyfe »

RV-007 wrote:Is this the equivalent of A_SkullAttack w/o the damage (may include A_FaceTarget)? If so, I can finally make a rampaging stampede of demons to (eventually) climb over ledges w/o infighting each other.
Nah, that's far from what this is. Add another to the list for a A_SkullAttack extension. :?
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it
Contact:

Re: [Code] NS's Random Code Stuff

Post by RV-007 »

I think that the Sin(Pitch) * force parameter will only work if the actor is facing a surface. The farther away the surface from the actor, the less the sin(pitch) force applied. I tried this for weapons.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Code] NS's Random Code Stuff

Post by NeuralStunner »

I have no idea what you're talking about. And somehow I doubt you do, either.

Please don't clutter up my topic with nonsense.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: [Code] NS's Random Code Stuff

Post by DoomRater »

Time to make some super missiles with this by calling this function repeatedly with a tiny bit of extra force each time...
User avatar
Uboa
Posts: 634
Joined: Sun Feb 19, 2012 8:53 pm
Location: Poniko's House
Contact:

Re: [Code] NS's Random Code Stuff

Post by Uboa »

DoomRater wrote:Time to make some super missiles with this by calling this function repeatedly with a tiny bit of extra force each time...
Nice bump. :wink:
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: [Code] NS's Random Code Stuff

Post by DoomRater »

You know what's weird? Everyone's usage of A_ChangeVelocity so far has been in the thought of using it on monsters/players. I intend to use it on a projectile. Dunno about you but I thought that was actually worth a bump, so the idea's there. But actually looking at that a bit more properly, why, by golly I think I got the code for Link's hookshot as well. This is going to prove very useful...
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [Code] NS's Random Code Stuff

Post by Enjay »

DoomRater wrote:I intend to use it on a projectile.
Presumably that could be used to give something a behaviour similar to the rocket in Half life. It fires and then seems to pick up speed shortly afterwards as its thruster kicks in.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: [Code] NS's Random Code Stuff

Post by DoomRater »

Pretty much how Samus's super missiles behaved in Super Metroid as well. I think Perfect Dark's Main rocket launcher behaves this way too.
User avatar
Xtyfe
Posts: 1480
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: [Code] NS's Random Code Stuff

Post by Xtyfe »

I experimented with such missiles in ZDoom, I found them to be great when used by the player. However when used by a monster for example, they are easy to dodge
User avatar
Uboa
Posts: 634
Joined: Sun Feb 19, 2012 8:53 pm
Location: Poniko's House
Contact:

Re: [Code] NS's Random Code Stuff

Post by Uboa »

Enjay wrote:
DoomRater wrote:I intend to use it on a projectile.
Presumably that could be used to give something a behaviour similar to the rocket in Half life. It fires and then seems to pick up speed shortly afterwards as its thruster kicks in.
Oh wow, that's a great idea for Doom. I never even thought about that.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Code] NS's Random Code Stuff

Post by NeuralStunner »

It's actually possible (and a wee bit simpler) to make collision-safe super-fast projectiles by changing their velocity after spawn. But you miss a few randomization opportunities.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Code] NS's Random Code Stuff

Post by NeuralStunner »

For those looking for target-finding melee attacks like Hexen does, I've added code that does it. I'm already using this system in a number of mods so I'm certain it works properly.

Enjoy!
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: [Code] NS's Random Code Stuff

Post by DoomRater »

That is... an interesting way to run code. People using inventory items to hide subroutines isn't something I had thought of, plus the function base is awesome.

Has anyone thought to put all of these inherited classes in a dependency WAD file that everyone could use to increase inter-mod compatibility? It would help with duplicate actor definitions when everyone is using the same base for inheritance. Then again, it seems to me that there are a lot of people who are familiar with editing mods to get them to work properly, and the only time this comes into play is when someone refuses to allow others to alter the mod for any reason.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Code] NS's Random Code Stuff

Post by NeuralStunner »

I think the most problem you'd run into is a startup warning when running multiple mods that use the same actor name. You can get around that by prefixing the names with an identifier specific to your mod.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Code] NS's Random Code Stuff

Post by NeuralStunner »

Just posted another nice trick I discovered while working on a mod. (I was trying to make a bouncing projectile lsoe damage with each bounce. It worked!) I think you guys will like it.
Post Reply

Return to “Script Library”