Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 927 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
entity passing through everything #414316
12/28/12 17:39
12/28/12 17:39
Joined: Dec 2009
Posts: 82
D
Denn15 Offline OP
Junior Member
Denn15  Offline OP
Junior Member
D

Joined: Dec 2009
Posts: 82
im moving an entity with c_move but the entity passes through everything. the world does not have the passable flag set

Code:
#include <default.c>
#include <acknex.h>

ENTITY* player_box;
var jump = 0;

function cam()
{
	while (1)
	{
		camera.x = player_box.x - 100;
		camera.z = 300;
		camera.y = 0;
		camera.tilt = -50;
		wait (1);
	}
}

function land()
{
	if (event_type == EVENT_BLOCK)
	{
		jump = 0;
	}
}
function shoot()
{
	while (1)
	{
		if (key_space)
		{
			jump = 20;
			while (1)
			{
				c_move (player_box, nullvector, vector(0, 0, jump*time_step), GLIDE);
				jump = jump - 0.2;
				if (event_type == EVENT_BLOCK){break;}
				wait(1);
			}
		}
		wait(1);
	}
}
action player_move()
{
	player_box = my;
	c_setminmax(my);
	my.emask |= ENABLE_BLOCK;
	my.event = land;
	cam();
	shoot();
	while (1)
	{
		c_move (my, nullvector, vector (1*time_step, 20*(key_a-key_d)*time_step, 0),GLIDE);
		wait (1);
	}
}
function main()
{
	level_load ("level.wmb");
}


Re: entity passing through everything [Re: Denn15] #414318
12/28/12 18:25
12/28/12 18:25
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
I had this problem too a few days ago. Try to compile the map as "BSP Map" ( not simple map ). If should work now, but dont ask why.

And i see a problem in your jumping script. Try to jump against a wall. Player stops falling down right ?


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: entity passing through everything [Re: rayp] #414320
12/28/12 18:50
12/28/12 18:50
Joined: Dec 2009
Posts: 82
D
Denn15 Offline OP
Junior Member
Denn15  Offline OP
Junior Member
D

Joined: Dec 2009
Posts: 82
well ive tried to compile both a simple map and bsp map but nothing changes

and yea i know i havent got into how to make it only activate when it hits the ground.

another thing i noticed is that when running the script it loads all kind of weird dll files that it didnt do before like ackphysx.dll and ackwii.dll even though i use none of those

Re: entity passing through everything [Re: Denn15] #414321
12/28/12 18:54
12/28/12 18:54
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
sry then i cant help. I dont know what caused this strange behaviour.

edit: about the ground do something like that
Code:
var dist_z;
 var dist2ground = 0;
 dist2ground = c_trace(my.x, vector(my.x, my.y, my.z-1000)...USE_BOX
 if(dist2ground > 2 || dist2ground == 0){
   accelerate(dist_z, -2.5 * time_step, -1);
   }
 else dist_z = 0; // jumping over stand on something

..
 c_move(me....vector(.., .., dist_z...


Last edited by rayp; 12/28/12 19:02.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: entity passing through everything [Re: rayp] #414398
01/01/13 13:07
01/01/13 13:07
Joined: Dec 2009
Posts: 82
D
Denn15 Offline OP
Junior Member
Denn15  Offline OP
Junior Member
D

Joined: Dec 2009
Posts: 82
i tried to simplyfy the script down to this

Code:
#include <acknex.h>
#include <default.c>

ENTITY* player_box;
var jump = 0;

function cam()
{
	while (1)
	{
		camera.x = player_box.x - 10;
		camera.z = 100;
		camera.y = player_box.y;
		camera.tilt = -50;
		wait (1);
	}
}

action my_car()
{
	player_box = my;
	cam();
	while (1)
	{
		c_move (my, nullvector, vector (1*time_step, 20*(key_a-key_d)*time_step, 0),GLIDE);
		wait (1);
	}
}
function main()
{
	level_load ("homework18.wmb");
}



and then copy the script to a one of the litec workshop project about moving entities where the previous script worked. however the new script makes the car go through everything again so i assume that is must be something with the script.

Re: entity passing through everything [Re: Denn15] #414399
01/01/13 13:18
01/01/13 13:18
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
did you try the USE_POLYGON flag for c_move?


POTATO-MAN saves the day! - Random
Re: entity passing through everything [Re: Kartoffel] #414401
01/01/13 15:46
01/01/13 15:46
Joined: Dec 2009
Posts: 82
D
Denn15 Offline OP
Junior Member
Denn15  Offline OP
Junior Member
D

Joined: Dec 2009
Posts: 82
it still goes through smirk

Re: entity passing through everything [Re: Denn15] #414402
01/01/13 15:51
01/01/13 15:51
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Is your model centered around the origin in MED?

Btw. a few screenshots and a demo would help a lot.

Last edited by Superku; 01/01/13 15:52.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: entity passing through everything [Re: Superku] #414404
01/01/13 16:45
01/01/13 16:45
Joined: Dec 2009
Posts: 82
D
Denn15 Offline OP
Junior Member
Denn15  Offline OP
Junior Member
D

Joined: Dec 2009
Posts: 82
http://www.youtube.com/watch?v=8-Lr9VECmi4&feature=youtu.be

it is moved by c_move so it shouldnt move through. and yes the model is centered around the origin

Last edited by Denn15; 01/01/13 17:24.
Re: entity passing through everything [Re: Denn15] #414410
01/01/13 19:16
01/01/13 19:16
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
It's a problem with your level or with your model.
I've created a simple map and tested it, the code is fine and works without problems.


POTATO-MAN saves the day! - Random
Page 1 of 2 1 2

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