Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/26/24 12:45
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Lapsa), 1,268 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
What am I doing wrong? #94345
10/13/06 17:36
10/13/06 17:36
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
I have a flying bird that are supposed to turn when it hits a invisble wall.
But the bird is stopping when it reaches the wall.
The wall is a mdl. And I have set it to invisble.
Why isent it "reacting" to the wall. I have also tried to have it visible and no reaction. The bird only stops right infront of it.

here is the code I am using.
and yes I am using
my.enable_block = on;

Code:
define speed_x,skill21;
define speed_y,skill22;
define speed_z,skill23;

function hit_event_10()
{
if(event_type == event_click)
{
my.flag1 = on;
highscore = hitvar1;
wait(1);
}
if(event_type == event_block)
{ my.pan += 180; //turn around
}
}
action hit_object_10
{
my.enable_block = on;
my.enable_click = on;
my.event = hit_event_10;
my.speed_x = 10;
my.speed_y = 0;
my.speed_z = 0;
var speed[3];
while(my.flag1 == off)
{
vec_set(speed,my.speed_x);
vec_scale(speed,time);
ent_cycle("walk", my.skill1); // animate the bird
my.skill1 += 3 * time; // animation speed
my.skill1 %= 100; // loop animation
c_move(my,speed,nullvector,ignore_passable);

wait(1);
}
ent_remove(me);
}




Programmer in training... Own GameStudio Commerical 6.50
Re: What am I doing wrong? [Re: Fiskekona] #94346
10/13/06 18:55
10/13/06 18:55
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
kasimir Offline
Senior Member
kasimir  Offline
Senior Member

Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
I think you should use event_entity (for mdl) instead of event_block (this is level-geometry).
Perhaps you can use bounce to change the angles?!

Re: What am I doing wrong? [Re: kasimir] #94347
10/14/06 05:56
10/14/06 05:56
Joined: Apr 2004
Posts: 516
USA
Trooper119 Offline
User
Trooper119  Offline
User

Joined: Apr 2004
Posts: 516
USA
I found this in the manuel:
Collision with a surface of the level during a MOVE instruction. The entity must not be PASSABLE and it's PUSH value must be 0 or less. On start of the EVENT function, the vector NORMAL is set to a direction perpendicular to that surface, and the vector BOUNCE is set to the direction into which the entity would bounce off.

So double check your push values, my.push for the bird should have a 0 or less value


A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C
Re: What am I doing wrong? [Re: Trooper119] #94348
10/14/06 09:13
10/14/06 09:13
Joined: May 2006
Posts: 132
Norway
Fiskekona Offline OP
Member
Fiskekona  Offline OP
Member

Joined: May 2006
Posts: 132
Norway
Thanks for the try to help me. I had to remove al my mdl walls and have the bird fly inide a box..... then it worked fine...


Programmer in training... Own GameStudio Commerical 6.50

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