Im still working on my gnomish steam walkers and it seems this time I stumbled on a pretty tough problem.
I wanted to try making a toolkit item that when used spawns a walker.
As far as I searched around and understood theres no easy solution to this.
Heres how I get it. If Im wrong about something please correct me.
"SpawnCharacterXYZ" function creates a new character as the same type as script user. That is it kinda copies the object.
Its how most global items work. The held "item" version and placed "game object" version are both the same thing but in different states.
I have different 3D model for item and the walker though and its kinda tough to mix them together. Havent seen any way to change objects model during game.
Spells seem to be some kind of special case as they got the "book" version and "spell" version which are switched between one another.
I wouldnt wish my toolkit to be a book though. I was thinking more like a large box. Besides I still dont full get how these work exactly.
Character can be spawned with the "SpawnExactCharacterXYZ" function but it takes as argument slot number which is listed in spawn.txt file of every module.
Therefore this function wont do unless every single module in Egoboo adds the walkers into their spawn.txt.
I also found some odd note... "Slot is the character's profile slot... Get this from checking SLOT.TXT or DATA.TXT."
I havent seen a file called "slot.txt" anywhere.
Can someone give me any direction in this? Is what Im trying to do possible?
Edit: Ok. I just managed to do it by adding a slotted dependency in spawn.txt of a module.
It would still require to add this line everywhere though.
Are there any alternatives?
Spawnable global object
Moderator: Developers
- penguinflyer5234
- Sheep (Developer)
- Posts: 3025
- Joined: Wed Jul 23, 2008 1:39 am
- Location: Best Southwest
Re: Spawnable global object
Instead of a number, could you try a string with the object name inside? ("gelfeet.obj" for example)
I can't remember if Zefz added that or not
I can't remember if Zefz added that or not
...
Re: Spawnable global object
You mean as an argument to the "SpawnExactCharacterXYZ"?
I havent seen a string ever user as function argument.
Tried it though and didnt seem to work. (Though Im not even sure how to mark the string. Any quote marks etc?)
I guess I should mention that I got the release 2.8.1 version.
I havent seen a string ever user as function argument.
Tried it though and didnt seem to work. (Though Im not even sure how to mark the string. Any quote marks etc?)
I guess I should mention that I got the release 2.8.1 version.
- penguinflyer5234
- Sheep (Developer)
- Posts: 3025
- Joined: Wed Jul 23, 2008 1:39 am
- Location: Best Southwest
Re: Spawnable global object
tmpargument = "gelfeet.obj"
tmpx = blah
SpawnExactCharacterXYZ (I don't remember what the difference is between SpawnExact and Spawn )
It was a "recent" thing, adding strings for like SendMessageNear and the like. It could've been a wanted feature though
tmpx = blah
SpawnExactCharacterXYZ (I don't remember what the difference is between SpawnExact and Spawn )
It was a "recent" thing, adding strings for like SendMessageNear and the like. It could've been a wanted feature though
...
Re: Spawnable global object
Its not working in my version but if its planned as youre saying then thats exactly what I need.
Guess Ill wait with finishing this for the next release.
Thanks for help!
Guess Ill wait with finishing this for the next release.
Thanks for help!
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Re: Spawnable global object
Yes, I had implemented this in the trunk. I don't remember if this is in the RC or not.penguinflyer5234 wrote:Instead of a number, could you try a string with the object name inside? ("gelfeet.obj" for example)
I can't remember if Zefz added that or not