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
3 registered members (dr_panther, Ayumi, 7th_zorro), 877 guests, and 3 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
stuck player #315387
03/15/10 05:10
03/15/10 05:10
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
There's something wrong with this section of my player code. The player gets stuck in the stand animation and won't respond to the mouse_right until he hits a certain pan position--not always the same one.

I've tried every collision trick in the manual and a few from AUM and the forum but can't solve the problem.

Code:
player = my; 
c_setminmax(me);
vec_set(my.min_x,vector(-15,-15,-50));
vec_set(my.max_x,vector(15,15,50));
my.z = 60;
   while (1)
      {
   	 player.pan -= 5 * mouse_force.x * time_step; 
         if(key_pressed(281)) //mouse right
          {
           ent_animate(my, "walk", walk_percentage, ANM_CYCLE); 
           walk_percentage += 7 * time_step; 
           walk_percentage %= 100;
           
	if (walk_percentage < 10)
   	{
	      sounded_once = 1;
	}
	if ((walk_percentage > 50) && (sounded_once == 1)) 
	{
	    sounded_once = 2;              
	    ent_playsound(my, step2_wav, 70);              
			}               
	if ((walk_percentage > 95) && (sounded_once == 2)) 
	{
	    sounded_once = 3;              
	    ent_playsound(my, step2_wav, 70);              
	}
	c_move (my, temp.x, nullvector, IGNORE_PASSABLE | GLIDE );
	temp.x = movement_speed * (mouse_right)*0.6 * time_step;
         }
      else
         {
         ent_animate(my, "stand", stand_percentage, ANM_CYCLE); 
         stand_percentage += 5 * time_step; 
	}
	wait(1);
	}



That isn't all the action, of course, but the rest of it --camera, gravity--seems to be working okay.

Re: stuck player [Re: JazzDude] #315406
03/15/10 10:40
03/15/10 10:40
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Hey Rod, is the wait(1); in the right place? shouldnt it look like this?

ent_animate(my, "stand", stand_percentage, ANM_CYCLE);
stand_percentage += 5 * time_step;
wait(1);

then the bracket? i am no pro, just wondering. and arent you missing the skill number?

Last edited by Blink; 03/15/10 10:43.

My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: stuck player [Re: Blink] #315474
03/15/10 19:53
03/15/10 19:53
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I've isolated it to the player.pan line. Without it everything else works.

Re: stuck player [Re: JazzDude] #315504
03/16/10 07:57
03/16/10 07:57
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
you could beter use c_rotate instead of using player.pan

this way it can get stuck in lvl geomtry


"empty"
Re: stuck player [Re: flits] #315547
03/16/10 15:44
03/16/10 15:44
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Yes, I used that too. I think the problem is with the camera when the player turns. I'm reworking that this morning.

Re: stuck player [Re: JazzDude] #315625
03/17/10 17:49
03/17/10 17:49
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Rod, did you every figure this out?


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: stuck player [Re: Blink] #315665
03/18/10 00:27
03/18/10 00:27
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Yeah, but don't ask me how. I played with it for three days. Rewrote it from scratch a few times. Borrowed ideas from AUM. And made several hundred minor and major changes. Somewhere in that mess it was cured. So I still don't know the cause or the cure. crazy

Re: stuck player [Re: JazzDude] #315670
03/18/10 01:03
03/18/10 01:03
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
well, i guess its better to be lucky then. i can't wait to see what you have up your sleeve for your next great adventure. i admire your dedication, and great works. you inspire me, Rod!


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: stuck player [Re: Blink] #315754
03/18/10 19:25
03/18/10 19:25
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Ah crap....I tried the game on my weaker PC and the problem returned. I think I'll take up knitting. sick

Re: stuck player [Re: JazzDude] #315774
03/18/10 23:14
03/18/10 23:14
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
no, dont give up Rod.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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