A_SetHeight and A_SetRadius

Moderator: GZDoom Developers

Post Reply
User avatar
GhostKillahZero
Posts: 742
Joined: Wed Nov 13, 2013 4:41 pm
Location: 343 Industries Headquarters
Contact:

A_SetHeight and A_SetRadius

Post by GhostKillahZero »

Just like [wiki]A_SetMass[/wiki], but two more functions easier to use instead of hacky workarounds... thoughts?
EDIT: or how about A_SetSize(int height, int radius, int flags [, state fail])
Last edited by GhostKillahZero on Tue Jun 03, 2014 4:03 pm, edited 1 time in total.
User avatar
Nash
 
 
Posts: 17498
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: A_SetHeight and A_SetRadius

Post by Nash »

It's easy to do (literally just takes a few lines to add in the source code; I've already done it in my source fork) but the argument of not adding it into official versions is that the actors might get stuck in level geometry/inside other actors if these two commands aren't used sparingly...

(Not a very strong argument, in my opinion - there are already other ways to abuse the engine and break levels :P)
User avatar
Zanieon
Posts: 2059
Joined: Tue Jan 13, 2009 4:13 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Somewhere in the future
Contact:

Re: A_SetHeight and A_SetRadius

Post by Zanieon »

Nash wrote:It's easy to do (literally just takes a few lines to add in the source code; I've already done it in my source fork) but the argument of not adding it into official versions is that the actors might get stuck in level geometry/inside other actors if these two commands aren't used sparingly...

(Not a very strong argument, in my opinion - there are already other ways to abuse the engine and break levels :P)
Agree.

With this added or not, if someone wants joke with Actor's Collision, they will do via ACS however, for me those commands avoid the essencial use of ACS to change a Actor's collision size, making less hacks using ACS or MorphPowerups.
User avatar
zrrion the insect
Posts: 2432
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: A_SetHeight and A_SetRadius

Post by zrrion the insect »

It wouldn't really be that hard to make some stuff in decorate that would be run beforehand to make sure that the object had enough room to change the Radius/Height.
User avatar
Zanieon
Posts: 2059
Joined: Tue Jan 13, 2009 4:13 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Somewhere in the future
Contact:

Re: A_SetHeight and A_SetRadius

Post by Zanieon »

Actually i made a Script for Hunter's Moon V2.6 that checks if the vehicles fits in the place that the players wants decompress them, if it doesn't have enough size it denies the decompression.

It's very simple and checks the size by trying spawn a invisible actor that have the same size of the vehicle decompressed, if the spawn fails it tell to the Vehicle actor to not spawn the vehicle there, it have a duration of 2 tics, then disappears.

Maybe something of the kind can be made using some system of collision checking, with a hybrid actor that take the desired size of the thing that will have the collision changed.

Code: Select all

script 725 (void) //Checks if Cyclops uncompressed fits where the player tried to summon it, if yes keep the spawning process
{
	int x = GetActorX(0);
	int y = GetActorY(0);
	int z = GetActorZ(0);
	
	if (!Spawn("CyclopsTestBox",x,y,z,0,GetActorAngle(0) >> 8))
	{
		SetResultValue ( False );
	}
	
	else
	{
		SetResultValue ( True );
	}
}
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: A_SetHeight and A_SetRadius

Post by NeuralStunner »

Theoretically, you could make it default behavior to fail a size change if the result would not fit. However, a flag to disable this check could be needed in certain cases.
User avatar
zrrion the insect
Posts: 2432
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: A_SetHeight and A_SetRadius

Post by zrrion the insect »

Would something like this make sense:

A_SetSize(int height, int radius, int flags [, state fail_height [, state fail_radius [, state fail_both]]])
EDIT: Yes, int is what it should have been. Fixed
Last edited by zrrion the insect on Fri May 30, 2014 1:58 am, edited 1 time in total.
User avatar
Nightfall
Posts: 555
Joined: Thu Aug 06, 2009 4:00 am
Location: Finland

Re: A_SetHeight and A_SetRadius

Post by Nightfall »

It shouldn't need three fail states... one is enough. A_SetSize(int height, int radius, int flags [, state fail])
Last edited by Nightfall on Fri May 30, 2014 11:03 am, edited 1 time in total.
User avatar
Fishytza
Posts: 792
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: They/Them
Contact:

Re: A_SetHeight and A_SetRadius

Post by Fishytza »

A_SetSize(string height, string radius...
Why 'string'? Shouldn't they be integers?
User avatar
GhostKillahZero
Posts: 742
Joined: Wed Nov 13, 2013 4:41 pm
Location: 343 Industries Headquarters
Contact:

Re: A_SetHeight and A_SetRadius

Post by GhostKillahZero »

Nightfall wrote:It shouldn't need three fail states... one is enough. A_SetSize(int height, int radius, int flags [, state fail])
This might sound better and reasonable than A_SetHeight and A_SetRadius, although I'm still waiting for a Yes or No on this suggestion though...
EDIT: first post edited.
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: A_SetHeight and A_SetRadius

Post by Ryan Cordell »

I remember when A_SetProperty was a thing..

:P
User avatar
Major Cooke
Posts: 8209
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: A_SetHeight and A_SetRadius

Post by Major Cooke »

Zdoom's decorate only relies upon jumping if successful. Change "state fail" to "state success" IMO, and it will be good to go. Better consistency this way. It's how state jumps are made all throughout with jumping functions.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”