2 registered members (RealSerious3D, rvl),
1,187
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
moving platforms and camera probs
#80621
07/07/06 16:59
07/07/06 16:59
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
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: Xarthor]
#80624
07/08/06 20:18
07/08/06 20:18
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
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
Senior Expert
|
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: tek]
#80627
07/09/06 05:10
07/09/06 05:10
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
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
Expert
|
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: ulillillia]
#80630
07/10/06 01:13
07/10/06 01:13
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
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.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|