Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,377 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
point and click movement #250204
02/06/09 15:46
02/06/09 15:46
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline OP
Member
Darkyyes  Offline OP
Member
D

Joined: Jun 2007
Posts: 152
Norway
Hi, again.
can you help me with a point and click movement script?
and if there is a panel in the way it wont move if I click on it. Thanks


New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7
Re: point and click movement [Re: Darkyyes] #250251
02/06/09 21:22
02/06/09 21:22
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
There's a point and click (RPG) article in one of the older magazines; you'll have to convert it to lite-C first. Then, make sure to trigger the "click" event for all the panels and use it to prevent the player from moving.

Re: point and click movement [Re: George] #250252
02/06/09 21:25
02/06/09 21:25
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline OP
Member
Darkyyes  Offline OP
Member
D

Joined: Jun 2007
Posts: 152
Norway
oh, ok wink thanks wink

can you tell me which magazine?


New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7
Re: point and click movement [Re: Darkyyes] #250292
02/07/09 07:07
02/07/09 07:07
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
It's in Aum34.

Re: point and click movement [Re: George] #250300
02/07/09 08:32
02/07/09 08:32
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
ive converted that code into lite c already , so all youll have to do is the panel part , the thread is in lite c contributions

Re: point and click movement [Re: badapple] #250342
02/07/09 13:30
02/07/09 13:30
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline OP
Member
Darkyyes  Offline OP
Member
D

Joined: Jun 2007
Posts: 152
Norway
ok, thanks wink will take a look on it wink


New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7
Re: point and click movement [Re: Darkyyes] #251218
02/12/09 03:51
02/12/09 03:51
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline OP
Member
Darkyyes  Offline OP
Member
D

Joined: Jun 2007
Posts: 152
Norway
this is not about panel recognition but rather the movement itself
when I move the player it reacts poorly to slopes, even the smallest slopes makes my character slide down the sides of the slope, making the movement pretty messed up, I want it to react like that on only the pretty step slopes.

Code:

action playercam()

{



my.albedo=0;
VECTOR temp[3];VECTOR temp2[3];VECTOR temp_target[3];VECTOR pos1[3];VECTOR pos2[3];
var anim_percentage;

var rot_speed = 6; /////new var 
var new_angle;///////new var
vec_set(temp_target,my.x);
on_i = toggle_inventory;
player = my; // I'm the player
while(1)
{

if(mouse_left)
{

pos1.x = mouse_pos.x;pos1.y = mouse_pos.y;pos1.z = 0;
vec_for_screen (pos1, camera);
pos2.x = mouse_pos.x;pos2.y = mouse_pos.y;pos2.z = 20000;
vec_for_screen (pos2, camera);
c_trace (pos1,pos2,IGNORE_ME|IGNORE_PASSABLE|IGNORE_MODELS);
vec_set(temp_target,target);
}
if(vec_dist(my.x,temp_target.x)>20)
{
//vec_set(temp.x,temp_target.x);
//vec_sub(temp.x,my.x) ;
//vec_to_angle(my.pan,temp);
//my.pan = smooth(my.pan, 0.95);

////////////////////////////////////////////////new code//////////////////////////////////////////
vec_set(temp.x,temp_target.x);
vec_sub(temp.x, my.x);
vec_to_angle(new_angle, temp.x);
if (ang(new_angle - my.pan) < -3) 
{
my.pan -= rot_speed * time_step;
} 
else
{
if (abs(ang(new_angle - my.pan)) > 3) 
{
my.pan += rot_speed * time_step;
}

}
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

my.tilt=0;
c_move (my, vector(12*time_step,0 , -2), nullvector, IGNORE_PASSABLE | GLIDE);
ent_animate(my, "run", anim_percentage, ANM_CYCLE);
anim_percentage += 10 * time_step;
}
else
{
ent_animate(my, "stand", anim_percentage, ANM_CYCLE);
anim_percentage += 2 * time_step;
}


// camera code
camera.x = player.x - 300 * cos(player.pan);

camera.y = player.y - 300 * sin(player.pan); // use the same value (250) here

camera.z = player.z + 700; // place the camera above the player, play with this value
//camera.tilt = -20; // look down at the player
camera.arc = 90;

//camera.tilt = -20; // look down at the player
camera.tilt = -60; // look down at the player


//camera.pan = player.pan;
camera.pan = player.pan;
wait (1);

}







}


any tips? smile


New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7
Re: point and click movement [Re: Darkyyes] #251260
02/12/09 09:58
02/12/09 09:58
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
You have to adjust the movement speed depending on the slope angle; right now the code moves the player with 12 * time_step quants / frame regardless of the slope angle.

Re: point and click movement [Re: George] #262929
04/27/09 03:36
04/27/09 03:36
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
Heres an pld one from the board years ago but works well as it is...add to movement after gravity somewhere, should just plug straight in.


Code:
 					temp.tilt = 0;
					temp.roll = 0;
					temp.pan = -my.pan;
					vec_rotate(normal, temp);
					temp.tilt = -asin(normal.x);
					temp.roll = -asin(normal.y);
					my.tilt += 0.1 * ang(temp.tilt - my.tilt); // play with 0.1
					my.roll += 0.1 * ang(temp.roll - my.roll); // play with 0.1



Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
Re: point and click movement [Re: KiwiBoy] #262941
04/27/09 06:07
04/27/09 06:07
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
there is a UNTOUCHABLE flag for panels, which ignores panels.

also i made this for my forum members as 3dmouse example but may help:
http://rapidshare.com/files/225757395/3dmouse.rar

if you need i can translate comments.


3333333333
Page 1 of 2 1 2

Moderated by  George 

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