Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, RealSerious3D, chsmac85), 980 guests, and 1 spider.
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 4 1 2 3 4
ladder detection #311675
02/21/10 11:19
02/21/10 11:19
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Is there any way to make player leave ladder, if he for example turn away from it while climbing... or walks to sides or backwards? I tryed to use c_trace... but some problems with it, if player reaches the top of the ladder, trace is not touching it... so player just falls down...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ladder detection [Re: 3run] #311704
02/21/10 12:40
02/21/10 12:40
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Any one frown Really need help here


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ladder detection [Re: 3run] #311740
02/21/10 14:18
02/21/10 14:18
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Originally Posted By: 3run
Today at 01:19 PM

Originally Posted By: 3run
Today at 02:40 PM


Do you notice something?

And another thing:

Version 1) : My cake tastes bad. What have I done wrong?

Version 2) : I have used the following ingredients to make a cake: LIST. The cake tastes too sweet. What should I improve?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: ladder detection [Re: Superku] #311744
02/21/10 14:22
02/21/10 14:22
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline
Senior Member
mikaldinho  Offline
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
i dont understand what you just said?

Re: ladder detection [Re: mikaldinho] #311756
02/21/10 14:37
02/21/10 14:37
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
This does not surprise me at all !!


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: ladder detection [Re: Superku] #311759
02/21/10 14:39
02/21/10 14:39
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline
Senior Member
mikaldinho  Offline
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
Originally Posted By: Superku
This does not surprise me at all !!


what do you mean?

Re: ladder detection [Re: mikaldinho] #311789
02/21/10 15:39
02/21/10 15:39
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Superku you need my script?! If so, I can post it here, that is not problem.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ladder detection [Re: 3run] #311830
02/21/10 18:18
02/21/10 18:18
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Will some one try to help me? frown


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ladder detection [Re: 3run] #311868
02/21/10 22:18
02/21/10 22:18
Joined: Jun 2006
Posts: 214
Germany, NRW
T
TheThinker Offline
Member
TheThinker  Offline
Member
T

Joined: Jun 2006
Posts: 214
Germany, NRW
So,
Here my tip.
Use a passable area (block/ model) like water. If you touch it, you can move in every direction. This is very easy to implement. But you need to know the event system of Lite-C.
If you are inside this area you have to check the content var of c_move and the type of the touching model.
But don't expect, that I write such a code for you.

Perhaps you can SHOW YOUR code, than we are able to help you.

MfG,
Patrick

Re: ladder detection [Re: TheThinker] #311871
02/21/10 22:47
02/21/10 22:47
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
HERE IS MY SCRIPT:

Code:
var climb = 0;
var allow_climb = 0;
var ladder_movement[3];
var ladder_normal[3];
var _result;
var dir1[3];
var dir2[3];
var pos1[3];
var pos2[3];
var pos3[3];
var trace_coords;

function ladder_event()
{
	if(you)
	{
		if(you == player)
		{
			my.enable_impact = off;	//prevent the event to be triggered again and again during climbing
			vec_set(my.skill21,player.x);	//store the players position
			while(1)
			{
				proc_late();
				climb = 1;
				vec_set(player.x,my.skill21);	//place it at the stored position to prevent the normal movement
				my.skill30 = c_move(player,ladder_movement,nullvector,ignore_passable|ignore_passents|glide);	//move the player up or down
				if(camera.tilt > - 40)
				{
					ladder_movement.z = 25 * (key_w - key_s)*time_step;
			   } 
			   if(camera.tilt < - 40)
			   {
			   	ladder_movement.z = 25 * (key_s - key_w)*time_step;
			   }
			   ladder_movement.x = 0;
			   ladder_movement.y = 25*(key_a - key_d)*time_step;
			   
			   vec_set(pos1,my.x);
			   vec_set(pos2,vector(1,0,0)); 
			   vec_rotate(pos2,my.pan); 
			   vec_add(pos2,my.x);
			   vec_set(pos3,vector(0,0,1)); 
			   vec_rotate(pos3,my.pan); 
			   vec_add(pos3,my.x);
			   vec_diff(dir1,pos1,pos2); 
			   vec_diff(dir2,pos2,pos3);
			   vec_cross(ladder_normal,dir1,dir2);  
			   vec_normalize(ladder_normal,1);
			   _result = (vec_dot(player.x,ladder_normal)-vec_dot(my.x,ladder_normal))/sqrt( vec_dot(ladder_normal,ladder_normal) );
			   
			   vec_set(trace_coords.x, vector(400, 0, 0)); 
			   vec_rotate(trace_coords.x, player.pan);
			   vec_add(trace_coords.x, player.x);
			   
			   c_trace(player.x, trace_coords.x, IGNORE_ME | GLIDE); 
			   if(trace_hit){allow_climb = 1;}else{allow_climb = 0;}
			   if(allow_climb == 0 || _result < my.min_y || _result > my.max_y || key_space == 1)	
				{
					climb = 0;
					break;	
				}
				vec_set(my.skill21,player.x);	
				
				wait(1);
			}
			climb = 0;
			wait(-0.1);	
			my.enable_impact = on;	
		}
	}
}

action ladder()
{
	my.enable_impact = on;
	my.event = ladder_event;
	my.polygon = on;
	c_setminmax(me);
}


But as I sad, not that good...is there any way to make trace wider?? please help...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 1 of 4 1 2 3 4

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