A_SetHeight and A_SetRadius

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: A_SetHeight and A_SetRadius

Re: A_SetHeight and A_SetRadius

by Major Cooke » Mon Jun 09, 2014 12:55 pm

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.

Re: A_SetHeight and A_SetRadius

by Ryan Cordell » Wed Jun 04, 2014 12:37 am

I remember when A_SetProperty was a thing..

:P

Re: A_SetHeight and A_SetRadius

by GhostKillahZero » Tue Jun 03, 2014 3:55 pm

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.

Re: A_SetHeight and A_SetRadius

by Fishytza » Fri May 30, 2014 1:25 am

A_SetSize(string height, string radius...
Why 'string'? Shouldn't they be integers?

Re: A_SetHeight and A_SetRadius

by Nightfall » Thu May 29, 2014 11:53 pm

It shouldn't need three fail states... one is enough. A_SetSize(int height, int radius, int flags [, state fail])

Re: A_SetHeight and A_SetRadius

by zrrion the insect » Thu May 29, 2014 8:34 pm

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

Re: A_SetHeight and A_SetRadius

by NeuralStunner » Thu May 29, 2014 8:24 pm

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.

Re: A_SetHeight and A_SetRadius

by Zanieon » Thu May 29, 2014 7:27 pm

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 );
	}
}

Re: A_SetHeight and A_SetRadius

by zrrion the insect » Thu May 29, 2014 5:39 pm

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.

Re: A_SetHeight and A_SetRadius

by Zanieon » Thu May 29, 2014 5:29 pm

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.

Re: A_SetHeight and A_SetRadius

by Nash » Wed May 28, 2014 4:45 pm

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)

A_SetHeight and A_SetRadius

by GhostKillahZero » Wed May 28, 2014 3:50 pm

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])

Top