Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,459 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Shoots to the moon [Re: ] #454521
09/09/15 21:22
09/09/15 21:22
Joined: Aug 2013
Posts: 101
M
mschoenhals Offline OP
Member
mschoenhals  Offline OP
Member
M

Joined: Aug 2013
Posts: 101
Quote:

Your setting the door passable, is the gravity trace using IGNORE_PASSABLE flag? You actually should not set the door passable. What might be happening is a timing error. You set the door passable, then walk in to it, the reset passable - making it solid. That will cause the player bbox to be in the door as well as the gravity trace to be in the door. Gravity trace hitting inside a door will cause a negative trace return, which would cause the player to fly upward.

This looks like the most likely issue. The flying off is done once the player enters the door. Once the door is open, should it be set as passable then?

Re: Shoots to the moon [Re: mschoenhals] #454522
09/09/15 21:22
09/09/15 21:22

M
Malice
Unregistered
Malice
Unregistered
M



Yes because it's faster. and no passable ent would interact with a door.

Please read my above edits

Last edited by Malice; 09/09/15 21:52.
Re: Shoots to the moon [Re: ] #454523
09/09/15 21:25
09/09/15 21:25

M
Malice
Unregistered
Malice
Unregistered
M



No actually the door should never be passable. The player should fit the door and way.

Also increasing the trigger range can help.

You have a choice,
make it passable and leave it passable.
Don't ever make it passable
make it passable and then change back before the player ever reaches the door.

Re: Shoots to the moon [Re: mschoenhals] #454524
09/09/15 21:29
09/09/15 21:29
Joined: Aug 2013
Posts: 101
M
mschoenhals Offline OP
Member
mschoenhals  Offline OP
Member
M

Joined: Aug 2013
Posts: 101
So I tried this to make the door passable when opened but it didn't solve the issue.

Code:
function open_doors() // this function is called by each door
{
	//	t_door_sounds();
	if (my.swing)
	{
		if (my.angle > 0)
		{
			while (my.pan < my.skill64 + my.angle) // rotate the door
			{
				my.pan += my.speed * time_step;
					set (my, PASSABLE); // the key is passable
				wait (1);	
			}
		}		
		if (my.angle < 0)
		{
			while (my.pan > my.skill64 + my.angle) // rotate the door
			{
				my.pan -= my.speed * time_step;
					set (my, PASSABLE); // the key is passable
				wait (1);	
			}
		}		
	}
}


Re: Shoots to the moon [Re: ] #454525
09/09/15 21:30
09/09/15 21:30

M
Malice
Unregistered
Malice
Unregistered
M



If you view the code I posted from t_doors.c in the include folder, which can be include in your project setting and give you the actual template door, you will see at NO point is the door ever made passable.

I would only do this if the door has to ---- No actually I would never do this.

Don't make a door passable.

Re: Shoots to the moon [Re: ] #454526
09/09/15 21:31
09/09/15 21:31

M
Malice
Unregistered
Malice
Unregistered
M



No your problem is the reset

Code:
act door open

if(vec_dist(door_handle.x, player.x) < 100 && my.pan == closed_pan){
			set(me, PASSABLE);
			while(my.pan < closed_pan+90){wait(1);my.pan+=door_swing_speed;}
			SND_CREATE_STATIC(door_opens, door_opens_wav); // play the "door opens" sound
			snd_play(door_opens, 100, 0);
			//			door_sounds();  //runs the function for sounds below.
			reset(me, PASSABLE);
			while(key_enter){wait(1);}



Remove either the reset or both the set(passable) and reset(passable)

Last edited by Malice; 09/09/15 21:34.
Re: Shoots to the moon [Re: ] #454527
09/09/15 21:39
09/09/15 21:39
Joined: Aug 2013
Posts: 101
M
mschoenhals Offline OP
Member
mschoenhals  Offline OP
Member
M

Joined: Aug 2013
Posts: 101
Even when the door is open, if I run into the hinge, the player flies up. What should the reset do then? Should I take it out?

Re: Shoots to the moon [Re: mschoenhals] #454528
09/09/15 21:40
09/09/15 21:40

M
Malice
Unregistered
Malice
Unregistered
M



REMOVE for action open_doors ALL SET(me,PASSABLE) AND ALL RESET(me,PASSABLE).

Please

Last edited by Malice; 09/09/15 21:42.
Re: Shoots to the moon [Re: ] #454529
09/09/15 21:42
09/09/15 21:42

M
Malice
Unregistered
Malice
Unregistered
M



Also please make sure there are no other passable or water like blocks in the door way-opening

Re: Shoots to the moon [Re: ] #454531
09/09/15 21:46
09/09/15 21:46

M
Malice
Unregistered
Malice
Unregistered
M



Also BOTH OF THESE in the door action need to be changed.
Code:
return; // the action stops afterwards



It's not a return it needs a break to work this way.
You do not terminate the main action of a ent.

Now I have to look up if break kills a infinite loop. Keep a eye out for another edit.

EDIT- I'm not even sure you can break that loop. Because the while() should have a condition. like while(my.skill88)
then instead you can set skill88 in the if/else and use a break.


Last edited by Malice; 09/09/15 21:51.
Page 2 of 3 1 2 3

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1