Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/25/26 03:42
Chat Room for Zorro Programmers
by Haitao_Ren. 10/25/26 03:14
Trading Journey
by Haitao_Ren. 10/25/26 03:14
Algorithmic trading course with Zorro
by Haitao_Ren. 10/25/26 03:12
Zorro tutorial ideas?
by Haitao_Ren. 10/25/26 02:47
Zorro plugin for Hyperliquid.xyz
by mayarik. 10/24/26 09:14
Tradestation missing in table of contents
by AndrewAMD. 10/23/26 14:35
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (3run, TipmyPip, opm), 7,722 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Haitao_Ren, JimSimons, julienp, julienper, KelleyAbbey
19247 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
RPG game movement #430279
09/26/13 12:21
09/26/13 12:21
Joined: Sep 2013
Posts: 5
R
richardb Offline OP
Newbie
richardb  Offline OP
Newbie
R

Joined: Sep 2013
Posts: 5
Hello everyone,

Can someone help me in the right direction.
I want to click the map with my mouse so the player move`s towards to clicked location.

I.e
pos player_1 = 0,0,0
when i click the mouse at 10,10,0
the charector has to move there. iam stuck with this for a week now can someone help me out?
iam using A8 engine.

Re: RPG game movement [Re: richardb] #430300
09/26/13 14:43
09/26/13 14:43
Joined: May 2009
Posts: 5,378
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,378
Caucasus
Search AUM magazine, there are few examples there, plus search free resources:
http://www.coniserver.net/coni_users/web_users/pirvu/aum/aumonline_e/
http://au.conitec.net/


Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: RPG game movement [Re: 3run] #430311
09/26/13 16:36
09/26/13 16:36
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
The concept is this:
Player clicks on screen, you convert screen coords to world coords (vec_for_screen) and use the result and result + z position for depth and trace to get ground coordinates.
I guess you can move your entity from that point yourself laugh

I'd also suggest you browse for the tile tutorial, because making a 3d point and click without tiles can be messy and buggy. If you have tiles it becomes 10 times simpler, even if the tiles are small.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: RPG game movement [Re: EpsiloN] #430318
09/26/13 18:23
09/26/13 18:23
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
...once I will finish and debug my 2010/11 winter contest entry to move the player along a tile based path, controlled by clicking...

Edit: nearly forgot a more useful info: try Peragro, it uses the Recast/Detour navmesh pathfinder. not totally finished, but should work.

Last edited by sivan; 09/26/13 18:28.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: RPG game movement [Re: sivan] #430322
09/26/13 19:57
09/26/13 19:57
Joined: Sep 2013
Posts: 5
R
richardb Offline OP
Newbie
richardb  Offline OP
Newbie
R

Joined: Sep 2013
Posts: 5
arg i dont want to spend a week searching haha my eyes hurt.
iam trying too find some source code so i can learn from it.

Re: RPG game movement [Re: richardb] #430330
09/26/13 21:44
09/26/13 21:44
Joined: May 2009
Posts: 5,378
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,378
Caucasus
Originally Posted By: richardb
iam trying too find some source code so i can learn from it.
Search for it wink

Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: RPG game movement [Re: 3run] #430368
09/27/13 10:42
09/27/13 10:42
Joined: Sep 2013
Posts: 5
R
richardb Offline OP
Newbie
richardb  Offline OP
Newbie
R

Joined: Sep 2013
Posts: 5
i been looking for a week + , can someone help me out a lil bit? i look and i look but i find stuff thats really old. not even in the manual about about rpg movement.

U should thought that a game engine would give u hints and tips about every code and funcion but i see that the info u get from the help file isn't sufficient , i might just consider too buy a other game engine that has the code in it and other helpful tips.

I`n here to learn on the forums but all i get is nothing not useful tips. forum doesn't have allot either and the help u get on you tube is minimum as for Google too.

Ill give it a try this weekend again wasting my time searching and searching , if i wont find it ill just look for a other game engine that has more support and is used more the 3dgs.

Kinda weird that you have to do magic before u can walk with your mouse as in a 3d game. I thought this engine was designed for people that want to learn etc...
but i find it hard to get all the basic skills i need from the help file`d or tutorials. If i made a game engine , i would have samples for everything u can imagine so other people can learn from it.

Im really sad about this. 3dgs was a pretty engine at sight but as u get deeper you`l see less support and info about the stuff u trying todo.

I.e : mouse movementand targeting , its all really vague.
tut 14: mouse

-its nice too move your mouse over a object and it lights up yea,

-but where is the simple code that makes Ur entity move from 0,0 to 10.10 ?not there.

- if i change 1 item i get a error message. where are all the error message descriptions? "too many function" whats that?

- camera movement with mouse. i don't need that and thats pretty easy stuff.i need player movement with mouse ,(click 10.10 and char with find its way there.)

- changing mouse cursors , i don't need that either because i can figure that out with the samples i have.

This gives me allot of frustration that i get a manuel or tutorial that is incomplete.

Its like heres a spear and go out hunt but you dont know what hunting means.

Re: RPG game movement [Re: richardb] #430371
09/27/13 10:58
09/27/13 10:58
Joined: May 2009
Posts: 5,378
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,378
Caucasus
Ohh, so you really want to learn? Hm, ok then, here is the working example (c-script):
AUM 34 TUTORIAL
And here you'll learn how to convert c-script into lite-c:
Migration to Lite-C

So, if you've finished all those workshops, you'll be able to convert this simple snippet with no problems.
Especially if you are willing to learn (aren't you?), you'll find lot of interesting information.

Originally Posted By: richardb
Ill give it a try this weekend again wasting my time searching and searching
If you are about to talk this way, better leave this forum.
Originally Posted By: richardb
can someone help me out a lil bit?
So, what are we doing you think? Bullshiting you?
Don't expect us to write something from scratch, try something yourself, especially if you are willing to learn wink

All in all, you don't like this place? Good luck then, there is no one around here, willing to lick your ass up.
I'll help as much, as it possible for us to do (not cause of the knowledge, but the time), don't like? Fuck off.

Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: RPG game movement [Re: 3run] #430380
09/27/13 13:11
09/27/13 13:11
Joined: Sep 2013
Posts: 5
R
richardb Offline OP
Newbie
richardb  Offline OP
Newbie
R

Joined: Sep 2013
Posts: 5
ok i did some editing and came up with this. i had todo this because when i downloaded this tutorial it wouldn't work....

c_move(me, vector(1, 0 ,-1 ), vector(0, 0 ,0 ), GLIDE); // i put in this line so the actor actualy moves towards the location.

from a programmers point of view , i can say that the "noobs" have problems finding the right piece of code to make things work. Dont flame me about it iam just pointing it out that its still hard to get things done with the help file ect... also looking for piece`s of code take allot of time. iam alone and don't have anyone to work with that can help me ect.

/////////////////////////////////////////////////////////////////////////////////////////////
// copy this folder inside your gamestudio folder
// open rpg1.wmp, build it and run it using rpg1.wdl
/////////////////////////////////////////////////////////////////////////////////////////////

var video_mode = 12; // 800x600 pixels
var video_depth = 16; // 16 bit mode

/////////////////////////////////////////////////////////////////////////////////////////////

string rpg1_wmb = "test.wmb";
string destination_mdl = "destination.mdl";

/////////////////////////////////////////////////////////////////////////////////////////////

sound beep_sound = <beep.wav>;

/////////////////////////////////////////////////////////////////////////////////////////////

function set_target();
function show_target();

/////////////////////////////////////////////////////////////////////////////////////////////

entity* destination;

/////////////////////////////////////////////////////////////////////////////////////////////

bmap pointer_pcx = <pointer.pcx>;

/////////////////////////////////////////////////////////////////////////////////////////////



action warlock
{
player = me;

while (1)
{
my.skill1 = 5 * time;
my.skill2 = 0;
vec_set (temp, my.x);
temp.z -= 3000;
trace_mode = ignore_you + ignore_passable + use_box;
my.skill3 = -trace (my.x, temp);
if (destination != null)
{
vec_set (temp.x, destination.x);
vec_sub (temp.x, my.x);
vec_to_angle (my.pan, temp); // turn towards the destination
my.tilt = 0; // don't bow laugh

if (vec_dist (my.x, destination.x) > 60)
{
move_mode = ignore_passable;
c_move(me, vector(1, 0 ,-1 ), vector(0, 0 ,0 ), GLIDE); // i put in this line so the actor actualy moves towards the location.
wait(1);
ent_cycle("walk", my.skill46);
my.skill46 += 10 * time; // "walk" animation speed
my.skill46 %= 100; // loop animation
}
else
{
destination.invisible = on;
ent_cycle("idle", my.skill46); // play "stand" frames animation
my.skill46 += 1 * time; // "stand" animation speed
my.skill46 %= 100; // loop animation
}
}
wait (1);
}
}

function set_target()
{
var pos1;
var pos2;
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; // use a big value here
vec_for_screen (pos2, camera);
trace (pos1, pos2); // now "target" holds the coordinates of the hit point
destination = ent_create (destination_mdl, target, show_target);
}

function show_target()
{
// my.z += 10; // remove the comment and play with 10 if you are using other target models
my.passable = on;
while (mouse_left == 1) {wait (1);} // wait until the player releases the mouse button
while (mouse_left == 0) {wait (1);} // wait until the player presses the left mouse button again
ent_remove (me); // remove the old target
}

on_mouse_left = set_target;


function main()
{
level_load (rpg1_wmb);
wait (3);
while (player == null) {wait (1);}
mouse_map = pointer_pcx;
mouse_mode = 2;
camera.arc = 80; // play with this value
camera.x = player.x;
camera.y = player.y;
camera.z = 200;
camera.pan = 90; // initial pan angle
camera.tilt = -60;
while (1)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
if ((mouse_pos.x < 2) && (camera.x > -2500)) {camera.x -= 10 * time;}
if ((mouse_pos.x > screen_size.x - 2) && (camera.x < 2500)) {camera.x += 10 * time;}
if ((mouse_pos.y > screen_size.y - 2) && (camera.y < 2500)) {camera.y -= 10 * time;}
if ((mouse_pos.y < 2) && (camera.y > -2500)) {camera.y += 10 * time;}
wait (1);

}
}

Re: RPG game movement [Re: richardb] #430389
09/27/13 14:33
09/27/13 14:33
Joined: May 2009
Posts: 5,378
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,378
Caucasus
Originally Posted By: richardb
from a programmers point of view , i can say
You can't say anything from that point of view yet.

Convert the example you've posted into the lite-c, I've shared a link that will help you.
You'll get better help, if people will see that you are actually doing something yourself too.
Next time, when you'll try to post any piece of code, use code tags for it, instead of simple copy/past.

Good luck


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

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

Gamestudio download | 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