Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,466 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Model won't move, collision box does? #300377
12/01/09 20:19
12/01/09 20:19
Joined: Dec 2009
Posts: 8
S
Spkka Offline OP
Newbie
Spkka  Offline OP
Newbie
S

Joined: Dec 2009
Posts: 8
Since last night my door entity won't move after I pressed a button. I am pretty sure I didn't change any code.
Thing is I collide with the door before the button is pressed but after its pressed I can just walk through the door while the model stays in place. I have no clue what I am doing wrong.

Re: Model won't move, collision box does? [Re: Spkka] #300381
12/01/09 21:45
12/01/09 21:45
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Sorry, but we can't help you if you don't show us your code.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Model won't move, collision box does? [Re: Redeemer] #300391
12/01/09 23:29
12/01/09 23:29
Joined: Dec 2009
Posts: 8
S
Spkka Offline OP
Newbie
Spkka  Offline OP
Newbie
S

Joined: Dec 2009
Posts: 8
Its a model in the WED, set with the polygon flag. And its name is Door. This action is called after I pressed the button. I tried and I get the pointer to the entity. I figured when I add the action to behaviour its just like it should work.
Code:
action OpenDoor()
{
	ENTITY* Door= ent_for_name ( "Door" );
	var a;
	for ( a = 0; a < 300; a++ )
	{
		Door.y -= 0.4;
	}
	wait(1);
}



Last edited by Spkka; 12/02/09 00:24.
Re: Model won't move, collision box does? [Re: Spkka] #300395
12/02/09 00:49
12/02/09 00:49
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
but why use ent_for_name ? cant you just assign the action to the model, then my would be equal to that model so you would have:

action Door()
{
var a;
for ( a = 0; a < 300; a++ )
{
my.y -= 0.4;
}
wait(1);
}

this is for a door that moves down? the problem with the above code would be that the door would move up as soon as the level is started

Re: Model won't move, collision box does? [Re: darkinferno] #300415
12/02/09 11:21
12/02/09 11:21
Joined: Dec 2009
Posts: 8
S
Spkka Offline OP
Newbie
Spkka  Offline OP
Newbie
S

Joined: Dec 2009
Posts: 8
Thank you for the feedback. I worked with ent_for_name right now but it was wrong.
I changed it and assigned the action to the model.
One small question though, how could I make it easier for myself to use multiple doors controlled by keypads. I don't want to create a function for each model of course.

Re: Model won't move, collision box does? [Re: Spkka] #300429
12/02/09 13:57
12/02/09 13:57
Joined: Apr 2005
Posts: 3,076
Germany, NRW
rvL_eXile Offline

3D Artist
rvL_eXile  Offline

3D Artist

Joined: Apr 2005
Posts: 3,076
Germany, NRW
Try to use Skills to identify which door meant the Player..

cYa Sebastian


Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE


Re: Model won't move, collision box does? [Re: rvL_eXile] #300442
12/02/09 15:20
12/02/09 15:20
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
You could create a function that gets the scan code of the last key pressed, and then run a switch case with it. For different cases, just open different doors. You can use skills to identify which door the player wants to open like "rvL_eXile" said.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Model won't move, collision box does? [Re: Redeemer] #300562
12/03/09 10:34
12/03/09 10:34
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
wait has to be inside the loop.

Re: Model won't move, collision box does? [Re: Joey] #301263
12/09/09 10:13
12/09/09 10:13
Joined: Dec 2009
Posts: 8
S
Spkka Offline OP
Newbie
Spkka  Offline OP
Newbie
S

Joined: Dec 2009
Posts: 8
Can I set skill70 for example somehow in the WED?


Moderated by  HeelX, Spirit 

Gamestudio download | 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