subject to hole script

jonsilva

New member
hello
I wanted to set an enemy subject_to_hole 0 using the walkoff animation
but I found out that subject_to_xxxx only works after the entity has touched the ground...
I have him on top of a wall when the level starts
iam currently using this script
void subhole(int hole)
{// Set's subject to hole
    void self = getlocalvar("self");
    changeentityproperty(self, "subject_to_hole", hole);
}

is there a way to make an entity subject_to_hole 0 while in midair ?
 
jonsilva said:
hello
I wanted to set an enemy subject_to_hole 0 using the walkoff animation
but I found out that subject_to_xxxx only works after the entity has touched the ground...
I have him on top of a wall when the level starts
iam currently using this script
void subhole(int hole)
{// Set's subject to hole
    void self = getlocalvar("self");
    changeentityproperty(self, "subject_to_hole", hole);
}

is there a way to make an entity subject_to_hole 0 while in midair ?

yes,
if ( a > base ) ...
 
it still doesn't work...
but I don't know if I understand...
the problem here is not set him to subject_to_hole 0 only if he is on air..

its because he only accepts subject_to hole 0 after the offset has touched the ground

its like hes on top of a wall with a hole around him when he walks off from the wall he must be subject_to_hole 0 to be able to land on the ground

Code:
anim	walkoff
@script
if(frame==3)
{
       void self = getlocalvar("self");
	int alt = getentityproperty(self, "a");
	int bas = getentityproperty(self, "base");
	if ( alt > bas ){
    	changeentityproperty(self, "subject_to_hole", 0);
	}
}
@end_script
	loop	0
	delay	3
	offset	100 189
	bbox	0 0 0 0
	drawmethod	200 200 0 0 0 0 -1 0 0 0 0 -1
	frame	data/chars/beyond/1alien6/rise5.gif
	@cmd	degravity 1
	#@cmd	subwall 0
	frame	data/chars/beyond/1alien6/rise10.gif
	#@cmd	layer -1200
	frame	data/chars/beyond/1alien6/rise11.gif
	#@cmd	stop
	frame	data/chars/beyond/1alien6/rise12.gif
	#@cmd	subhole 0
	frame	data/chars/beyond/1alien6/rise13.gif
	frame	data/chars/beyond/1alien6/rise14.gif
	#@cmd	subplat 1
	frame	data/chars/beyond/1alien6/rise15.gif
	frame	data/chars/beyond/1alien6/rise16.gif
	#@cmd	leaper 0 2.7 0.3
	frame	data/chars/beyond/1alien6/rise17.gif
	frame	data/chars/beyond/1alien6/rise10.gif
	frame	data/chars/beyond/1alien6/rise11.gif
	frame	data/chars/beyond/1alien6/rise12.gif
	frame	data/chars/beyond/1alien6/rise13.gif
	frame	data/chars/beyond/1alien6/rise14.gif
	frame	data/chars/beyond/1alien6/rise15.gif
	frame	data/chars/beyond/1alien6/rise16.gif
 
Back
Top Bottom