ShiVa3D
Tagged Objects
All about the StoneScriptTagged Objects
by rusty » 20 Oct 2011, 20:12
Hi... For some reason I can't get a tagged object!
Yesterday I seemed to solve the issue by restarting the editor. Now i'm getting a nil variable.
I've tried both these methods:
and
before trying to use it in this:
I've even used the first variation in that...
This is only my second day so it's probably linking the AI to the scene or similar, but it's getting called... so?
Yesterday I seemed to solve the issue by restarting the editor. Now i'm getting a nil variable.
I've tried both these methods:
- Code: Select all
this.hBall( application.getCurrentUserSceneTaggedObject("ball") )
and
- Code: Select all
local hScene = application.getCurrentUserScene ( )
this.hBall( scene.getTaggedObject ( hScene, "ball" ) )
before trying to use it in this:
- Code: Select all
local x, y, z = object.getTranslation(this.hBall(), object.kGlobalSpace )
I've even used the first variation in that...
This is only my second day so it's probably linking the AI to the scene or similar, but it's getting called... so?
- rusty
- Expert Boarder

- Posts: 95
Re: Tagged Objects
by rusty » 20 Oct 2011, 23:40
I think my issue is to do with scene loading, reloading and AI initialisation...
More tests...
More tests...
- rusty
- Expert Boarder

- Posts: 95
Re: Tagged Objects
by RedQueen » 20 Oct 2011, 23:45
What you coded should work. I don't see why it is returning nil. I could look at your file if you want.
- RedQueen
- Platinum Boarder

- Posts: 331
Re: Tagged Objects
by rusty » 21 Oct 2011, 19:45
I think my issue is similar to this:
http://www.stonetrip.com/developer/forum/viewtopic.php?f=13&t=24351&sid=9ecc119aaa8ac326e46e13c13ef19c2d
Basically I used log.message() to indicate when AI's start running and they all (except object AI's) start running straight away...
I seem to have solved it in another test, even though I haven't even tried states yet, even though i'm using a variable as a state... probably wrong (ish) but it's doing the job for now.
Can anyone point me towards a good tutorial on using states please?
http://www.stonetrip.com/developer/forum/viewtopic.php?f=13&t=24351&sid=9ecc119aaa8ac326e46e13c13ef19c2d
Basically I used log.message() to indicate when AI's start running and they all (except object AI's) start running straight away...
I seem to have solved it in another test, even though I haven't even tried states yet, even though i'm using a variable as a state... probably wrong (ish) but it's doing the job for now.
Can anyone point me towards a good tutorial on using states please?
- rusty
- Expert Boarder

- Posts: 95
4 posts
• Page 1 of 1