Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
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
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), 838 guests, and 2 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
Path Nodes - Create in Script? #200688
04/05/08 10:31
04/05/08 10:31
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Is there a way to create path nodes in C-Script?

i.e create path nodes in real time?

TIA for any help


The Art of Conversation is dead : Discuss
Re: Path Nodes - Create in Script? [Re: indiGLOW] #200696
04/05/08 11:06
04/05/08 11:06
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
As far as I know: Nope

At least, I cannot find anything about creating path nodes in the manual.

ps: Nice to have you around here from time to time indiGLOW (my nickname back then was "Thunder") ;\)

Re: Path Nodes - Create in Script? [Re: indiGLOW] #200698
04/05/08 11:09
04/05/08 11:09
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Nodes can be anything.
Basically just a vector and a vector is storable in an array.
So why dont just get a huge array and create some nodes.
For example you can use 3 vars for the position and 4 for the connection ids.

That is how you can get the position or connections out of the array
yourarray[id*7] is the vector
yourarray[id*7+3] is the first connection id
yourarray[id*7+6] iss the last connection id
(and those between guess what xD )
Using this you can create a lot of paths in realtime
you also can use entitys instead of 7 array vars for a node
and use the skills for the connections.

You see there are a lot of possibilitys to make nodes in real time.
Maybe there is a way to create the standard WED paths in real time but since i dont use predefined functions like paths and templates and stuffi dont know.


EDIT: @ Xarthor:
Lol? Define Any-Node, WEDnode?

Last edited by Puppeteer; 04/05/08 11:10.

Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: Path Nodes - Create in Script? [Re: Puppeteer] #200700
04/05/08 11:14
04/05/08 11:14
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
@Puppeteer:
I guess indiGLOW asked for creating path nodes using scripts. (not sure though)
However I know only the way to create them in wed and read them out using scripts.

So what you mean with:
 Quote:

Lol? Define Any-Node, WEDnode?

???

Re: Path Nodes - Create in Script? [Re: Xarthor] #200705
04/05/08 11:29
04/05/08 11:29
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
The WED nodes are not the only possibility to create nodes
for example astar nodes are just vectors and pretty much the same as wed nodes (but wed node are undynamic :P )
So createing nodes via array is much better than creaating nodes via wed.


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: Path Nodes - Create in Script? [Re: Puppeteer] #201062
04/06/08 19:24
04/06/08 19:24
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Thanks guys, and a big shout out to my man, Thunder AKA Xarthor \:\)

Just to clarify the reason for wanting to create path_nodes in real time was to utilize the scan_path function, a scan designed to only look for path nodes.

This returns a number of variables / pointers that are not returned as easily with standard entity scans. So I was interested if this was supported as it would save time writing a new scan node system as you suggest Puppeteer.

As it is, I have bitten the bullet and am now creating a scan that looks for an entity with the Node flag set, and path find from there.

Still would have been handy to use the scan_path function instead \:\(

Thanks for the help, my basic Ai is now implemented and I am improving path finding and object avoidance at the mo.

Thanks again


The Art of Conversation is dead : Discuss
Re: Path Nodes - Create in Script? [Re: indiGLOW] #201168
04/07/08 11:20
04/07/08 11:20
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
you can create it very simple
function find_nearest_node()
{
var dist=-1;
var curr_id=0;
var counter=0;
while(counter<numnodes)
{
if(vec_dist(pointarray[counter*7],my.x)<dist||dist<0)//if you use the 7 vars for a node
{
curr_id=counter;
dist=vec_dist(pointarray[counter*7],my.x);
}
counter+=1;
}
return(curr_id);
}


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com

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