A_SetHeight and A_SetRadius
Moderator: GZDoom Developers
- GhostKillahZero
- Posts: 742
- Joined: Wed Nov 13, 2013 4:41 pm
- Location: 343 Industries Headquarters
- Contact:
A_SetHeight and A_SetRadius
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])
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.
Re: A_SetHeight and A_SetRadius
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)
(Not a very strong argument, in my opinion - there are already other ways to abuse the engine and break levels :P)
- 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
Agree.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)
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.
- 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
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.
- 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
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.
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 );
}
}
- 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
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.
- 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
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
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.
Re: A_SetHeight and A_SetRadius
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.
Re: A_SetHeight and A_SetRadius
Why 'string'? Shouldn't they be integers?A_SetSize(string height, string radius...
- GhostKillahZero
- Posts: 742
- Joined: Wed Nov 13, 2013 4:41 pm
- Location: 343 Industries Headquarters
- Contact:
Re: A_SetHeight and A_SetRadius
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...Nightfall wrote:It shouldn't need three fail states... one is enough. A_SetSize(int height, int radius, int flags [, state fail])
EDIT: first post edited.
- 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
I remember when A_SetProperty was a thing..


- 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
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.