Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,405 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Click and Move targeting chain... #259267
04/05/09 07:32
04/05/09 07:32
Joined: Jul 2007
Posts: 50
N
Nomad Offline OP
Junior Member
Nomad  Offline OP
Junior Member
N

Joined: Jul 2007
Posts: 50
RPG standard function of 'click and move' is not what I am after but a variation of it.

As the player points to a destination then clicks, a model is created to show the waypoint, path or node and the player model moves there.

What I have been unsuccessfully trying to create is a series or 'chain of click' created nodes that the player object moves to one at a time, node 1 first, then 2nd and so on.

I will get it eventually but its going to take me a little while.
So..........

Help would certainly be the request here, has anyone a script or methodology I could use to get there faster?

Re: Click and Move targeting chain... [Re: Nomad] #259357
04/05/09 16:14
04/05/09 16:14
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
just make an array and fill the array with different positions that are in the chain.

Re: Click and Move targeting chain... [Re: lostclimate] #259377
04/05/09 19:21
04/05/09 19:21
Joined: Jul 2007
Posts: 50
N
Nomad Offline OP
Junior Member
Nomad  Offline OP
Junior Member
N

Joined: Jul 2007
Posts: 50
Thanks but I dont know how to do that so could you give a small example here please?

Re: Click and Move targeting chain... [Re: Nomad] #259390
04/05/09 20:30
04/05/09 20:30
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI

Re: Click and Move targeting chain... [Re: lostclimate] #259452
04/06/09 08:05
04/06/09 08:05
Joined: Jul 2007
Posts: 50
N
Nomad Offline OP
Junior Member
Nomad  Offline OP
Junior Member
N

Joined: Jul 2007
Posts: 50
Thanks...

Re: Click and Move targeting chain... [Re: Nomad] #259529
04/06/09 15:59
04/06/09 15:59
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
np, if you need help understanding how arrays work you can google it and there is tons of info out there on how to manipulate arrays.

Re: Click and Move targeting chain... [Re: lostclimate] #259581
04/06/09 19:28
04/06/09 19:28
Joined: Jul 2007
Posts: 50
N
Nomad Offline OP
Junior Member
Nomad  Offline OP
Junior Member
N

Joined: Jul 2007
Posts: 50
Thanks for the help but its all too much info, anyone got a commented working exmple I could learn from?
I've gone over AUM's scripts and while arrays work well, I cant seem to understand the basis and process to write my own.

Re: Click and Move targeting chain... [Re: Nomad] #259640
04/07/09 01:46
04/07/09 01:46
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
well the basic theory is this

000000000
123456789

lets say each of those are values in the array and 0 is empty

so you put a new position, lets say 1 in the array

100000000
123456789

so you go through the array and make the first one in the row a 1 and then they click again, so you get to point 2

120000000
123456789

now you have 2 pts in the array. now lets say your character gets to pt 1, you remove it from the array

020000000
123456789

and then go thru each of the values and move it up one more slot so that they are next in line

200000000
123456789

that way they will go to point 2 next.


That is just one way to do it, but if you practice with arrays you will learn several ways to do it. You might want to google things such as stack's, deque's, queues, bubble searches and binary searches. They are all programming techniques for manipulating an array.


now you click some where else in the array

Re: Click and Move targeting chain... [Re: lostclimate] #259646
04/07/09 03:08
04/07/09 03:08
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
in other words, hes trying to get you to do this:

array clickarray[500];// allows you to click up to 500 times before it cant store anymore

when you click, it will store your first co-ordinates xyz(134,543,0) in the first slot.
when you click again, your next set of xyz will be put it into the second slot, until the first point is reached, then its erased; and player goes for the second set of numbers(which becomes the first set of numbers now)


if you clicked 3 times before you reach destination 1, your array will store 3 sets of xyz... make sense?


Visual image...

clickarray[500]
//New array made, looks like this:
0,0,0,0,0,0,0,0,0,0,0,0,0....500 times

click once, it looks like:
(134,543,0),0,0,0,0,0,0,0,0,0,0,0...

and if you click again before you get to target one:
(134,543,0),(265,789,0),0,0,0,0,0,0,0,0,0...

and if you reach target one, and click again, like this:
(265,789,0),(325,762,0),0,0,0,0,0,0,0,0...

so you can click up to 500 times until it cant store the last number...



I dont know how to delete the numbers in array slot 1, without deleting the whole array tho...


Good luck.





Last edited by DevoN; 04/07/09 03:09.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Click and Move targeting chain... [Re: DLively] #259655
04/07/09 04:17
04/07/09 04:17
Joined: Jul 2007
Posts: 50
N
Nomad Offline OP
Junior Member
Nomad  Offline OP
Junior Member
N

Joined: Jul 2007
Posts: 50
Thank you so much both of you, Glimmers of understanding are tantilisingly nearing comprehension.
I know I'll have to sleep with these before I understand completly but already excited by the glimmers given here.
Again, thanks to you both, appreciated.


Moderated by  adoado, checkbutton, mk_1, Perro 

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