Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
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 (RealSerious3D, rvl), 1,187 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
moving platforms and camera probs #80621
07/07/06 16:59
07/07/06 16:59
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
I am sorry to keep asking but im desperate, I always try to figure it out myself before asking.

I would like to make a moving platform that when I step on it it starts moving one direction, in my level I want to make my characther step on a raft that moves me through a tunnel filled with water.
kinda like the second level of superghoulsandghost for snes.

the other thing is camera when im in a walled environment.

if I turn left and I'm near a wall I disappear and all I see is the outside of my level.
here are some pictures that could explain it better.

I know it has something to do with camera.genius but dont know what.



this is me just facing normal, now I will turn left.



and this is the last which show outside my level.



Does anyone know how I can fix this ?

Last edited by tek; 07/07/06 18:06.
Re: moving platforms and camera probs [Re: tek] #80622
07/07/06 21:10
07/07/06 21:10
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
BTW the moving platform is not a necessity so if anyone has a tutorial on it that would be fine.

But I would definitely like to know how to fix the camera view.

Re: moving platforms and camera probs [Re: tek] #80623
07/07/06 21:26
07/07/06 21:26
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
About the camera issue:
I guess you're using the templates.
That your model disappears has nothing to do with the camera.genius actually.
The problem is, that the camera moves into a solid block ad though does not display any models anymore.
Now if you turn more left the camera moves out of the wall and you see your level from the outside.
The only way to fix this is to add collision to your camera.
How to do this?
Either ask in the templates forum if there is a collision for the camera available which works with the templates, or you script your own movement and camera system.
You could also ask in "User Requests" or the "Job Offered" forums if somebody is willed to do the scripting for you, if you are not that "advanced" in C-Script.

Re: moving platforms and camera probs [Re: Xarthor] #80624
07/08/06 20:18
07/08/06 20:18
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
Thanks Thunder I'll do that.

I have another ?
I have the code for the enemy to follow the player, recently I made a mummy and I want him to follow after me it all works fine with my mummy_follow_player code, except that when they follow me they pass through the unhollowed floors.
I want the Mummy to glide and not do that, I have tried changing it myself but would not be able to do it, can anyone who knows help me figure out.

this is my code.

Quote:


var reaction_distance = 900;
function get_shot
{
if(event_type==event_impact) // entity was hit by a bullet
{
sleep(1); //wait 4 seconds
my.invisible=on; //turn invisible
my.passable=on; //turn passable
myscore=myscore+10;
}
}

action mummyfollowplayer
{
while(me)//while I exist in the level
{
//check for the player
if(player)
{
if (my.health==0)
{
my.enable_entity=on; //make the enemy sensible to getting hit with c_move
my.event=get_shot; // run this function when hit

}
wait(1);
vec_set(temp,my.x);
trace_mode = IGNORE_ME;
while (1)
{
my.enable_impact=on;
my.event=lev_2_event;
break;
}

//turn to the player

vec_set(temp.x,player.x);
vec_sub(temp.x,my.x);
vec_to_angle(my.pan,temp.x);
if(vec_dist(my.x,player.x) < reaction_distance)
{
ent_move(vector(7,0,0),vector(2,2,1));
}
}
wait(1);
}
}




I tried changing the code in red to trace_mode= ignore_me+ ignore_passable+ glide;
and used Use_box etc but it doesn't seem to work.

These are pictures of what happens when the mummy follows me.





In the second picture the mummy is following me and walks through the floor.

Last edited by tek; 07/08/06 20:41.
Re: moving platforms and camera probs [Re: tek] #80625
07/09/06 04:13
07/09/06 04:13
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
First, make sure that the center of the models is in the center all 3 axes. For this, of which works best with the MED in 6.4, select the entire model, take the vertex at the lowest point and move it up to exactly on the Z axis. Take the topmost vertex and divide the position by 2 and set the position that way. Repeat for the other axes and this will exactly center your model. Doing this should help.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: moving platforms and camera probs [Re: ulillillia] #80626
07/09/06 05:08
07/09/06 05:08
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
thanks ulillillia I tried it and it did fix it a little still sometimes his feet would go through floor not as much as before but I guess it's ok like this.

Re: moving platforms and camera probs [Re: tek] #80627
07/09/06 05:10
07/09/06 05:10
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
The next thing I can think of is that this centering only applies to the standing animation and when walking/running, the feet "dip down" and otherwise cause this. The only other thing left is something to do with the bounding box. Make sure you set the bounding box's dimensions to that of the character.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: moving platforms and camera probs [Re: ulillillia] #80628
07/09/06 06:47
07/09/06 06:47
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Add this line before your "ent_move.." :
move_mode = ignore_passable + glide;

The trace_mode is for tracing, I don't see any tracing in your code
The move_mode needs to be set before the ent_move instruction.

Re: moving platforms and camera probs [Re: Xarthor] #80629
07/09/06 07:10
07/09/06 07:10
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ent_move is an old instruction and should not be used. Use c_move instead.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: moving platforms and camera probs [Re: ulillillia] #80630
07/10/06 01:13
07/10/06 01:13
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
ok I tried the c_move

c_move (me,laufen,nullvector,GLIDE+IGNORE_PASSABLE);

it didn't work either but tahts ok I gotta stop being a perfectionist as long as theirs an enemy and I shoot him im happy
I aint sure if it is supposed to be written like how I wrote it, btw what does laufen mean ?

Last edited by tek; 07/10/06 01:56.

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