I searched out a request for this posted in 2008, and later some reference to scripting, but never really found an answer.
In particular my idea was to use each clone of a simple model as a path point for a character, where collision with same would trigger instructions for char. plus next path point to pursue via steering controller. It seemed much easier to visualize than scripting path points as co-ords on a plane.
That's why I was querying clone identities. Comments?
SpawnModel Clones unique indentity
Moderator: Moderators
SpawnModel Clones unique indentity
"great expectations"
Hmm,
What exactly are you trying to do? Sounds like some sort of path-finding for AI .. but you rarely use linear paths for those kind of things.
Simpy assigning a unique identifier to a Clone is pretty straight forward. Increment a global counter ( integer ) after each spawn, and assign that value to a local variable of the Clone in the OnSpawn event.
K
What exactly are you trying to do? Sounds like some sort of path-finding for AI .. but you rarely use linear paths for those kind of things.
Simpy assigning a unique identifier to a Clone is pretty straight forward. Increment a global counter ( integer ) after each spawn, and assign that value to a local variable of the Clone in the OnSpawn event.
K
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
I am not exactly sure what you are after, however it reminded me of something i had worked on a while back,. see attached;
this just uses states to set the target of the units,. and then collision with the 'waypoints' sets the next state., notice that the stearing controller setup can be different yeilding various unit formations,. . may be usefull to you.
(LMB to drop units, RMB to position last waypoint,. R to clear units)
NB- you may have to change the grid bitmap,. rect.
this just uses states to set the target of the units,. and then collision with the 'waypoints' sets the next state., notice that the stearing controller setup can be different yeilding various unit formations,. . may be usefull to you.
(LMB to drop units, RMB to position last waypoint,. R to clear units)
NB- you may have to change the grid bitmap,. rect.
- Attachments
-
- wayPoints__010.zgeproj
- .zgeproj
- (9.97 KiB) Downloaded 515 times
iterationGAMES.com
@VilleK - This crashed the editor as soon as I loaded it. Going thru with a text editor and removing the BitmapRect was all I needed to make it work.
@JP - Yeah, thanks. That's just what I was writing about. Yer way ahead, but that is pretty well what I had envisioned. It just seems that the next step to avoid 4 or 40 SpawnModel entries would be to give each clone an identity.
@Kjell -
@JP - Yeah, thanks. That's just what I was writing about. Yer way ahead, but that is pretty well what I had envisioned. It just seems that the next step to avoid 4 or 40 SpawnModel entries would be to give each clone an identity.
@Kjell -
Umm... I'm not quite sure how to code that, but it seems it could be a possible addition to the component, rather than scripting extra.and assign that value to a local variable of the Clone in the OnSpawn event.
"great expectations"

@y_offs_et - You just need 2 DefineVariable Components. One named "identity" inside your Model ( in Definitions ), and another called "counter" outside your model. Each time you Spawn the Model you add a value of 1 to the counter, and in the OnSpawn event of your Model you use "identity = counter".
@jph - You don't have to use multiple DefineCollision & Model ( o_structure's ) Components, simply adjust the properties on the fly right before using them. I've attached a basic example.
K
- Attachments
-
- Collision.zgeproj
- (2.03 KiB) Downloaded 489 times
Yeah, that's what I'm writing about.
Getting rid of all those redundant repeating components.
When I finally get the use of Repeat straight in my head, I'll be able to explain better coding concepts in the help file.
I sometimes have some difficulty seeing conventional coding concepts in this XML/component format. I guess I'm getting old.

Getting rid of all those redundant repeating components.
When I finally get the use of Repeat straight in my head, I'll be able to explain better coding concepts in the help file.
I sometimes have some difficulty seeing conventional coding concepts in this XML/component format. I guess I'm getting old.
"great expectations"