Page 1 of 1

HElp: Spawning Cats (CEP) with AI from an item.

Posted: Wed Nov 17, 2004 12:23 pm
by Starslayer_D
Ok, I seek to create a script wich spawns one of the CEP cats or kittens with the AI enabled. This script can then be atatched to an item.

Cats spawned from the DM creator seem to lack the AI.

(Item as DM reward for someone who posetively smothered all cats found with adoration and attention. :) Reward: Item spawn cat/1* day).. I just can't script it correctly. :(.

Posted: Wed Nov 17, 2004 1:34 pm
by Krator
Create a creature in the palette with the appropiate tag/res ref and scripts, (the x2_def_(name) scripts work fine for me most of the time) and let item spawn it? Like:

Code: Select all

object oCat = CreateObject((stuff))
I guess it's more a creature palette thing than a code thing.

Oh, and you cannot edit blueprints from a hak pak so you have to edit copy the cat instead of editing the blueprint.

Posted: Wed Nov 17, 2004 1:43 pm
by Sindol
Might be a better idea to use EffectSummonCreature() for this, so the cat ends up in your party as a summon fully automatically, instead of just being a random critter. The latter requires you keep a close eye on the faction you assign to it, the former doesn't.

edit: basic idea by Krator was right though, just make a new cat blueprint with the AI you want it assigned. Much easier than mucking around with AI scripts of critters in runtime.

Posted: Wed Nov 17, 2004 3:04 pm
by Xandor Amakiir
Wauw, i would really love to have such a wand :D ... I'm a real cat lover, and think my bard would love to have one as a compannion, and if you make it so that the cat poses no threat to anything larger then mice. It would give me no extra perks...

Posted: Wed Nov 17, 2004 3:29 pm
by Starslayer_D
CEP Cats: ~ 4 HP, a bit of damage. They can chew up a rat, a dire rat chews them up.

It's supposed to be a RP prop reward for excelent RP... in defense of Shroediger's kittens.. *evil grin* (not on avlis, though)

Posted: Sat Nov 20, 2004 7:14 pm
by Starslayer_D
OK, took a look at the cat in the CEP demo module. It has a walk WP script on spawn.

How do I tell a critterto simply use standard random behavor upon creation? Or rather, what Ai script should I use? (drawing a blank here :( )

Posted: Sat Nov 20, 2004 9:00 pm
by Krator
Starslayer_D wrote:OK, took a look at the cat in the CEP demo module. It has a walk WP script on spawn.

How do I tell a critterto simply use standard random behavor upon creation? Or rather, what Ai script should I use? (drawing a blank here :( )
Take a look at x2_inc_switches for nice things.

All creatures autmaticly walk their waypoints (if they have BioWare onSpawn scripts) (Right click and select "create waypoint, or for spawned creatures set waypoints with WP_(creature tag)_##), if no waypoints are present with that tag it does nothing.

Posted: Sat Nov 20, 2004 9:04 pm
by Aloro
Starslayer_D wrote:OK, took a look at the cat in the CEP demo module. It has a walk WP script on spawn.

How do I tell a critterto simply use standard random behavor upon creation? Or rather, what Ai script should I use? (drawing a blank here :( )
The simplest approach, and the most robust, is to make a new version of the creature with the AI you want (you'll want to edit the OnSpawn script, which is nw_c2_default9). Anything you do in the module switches will affect every creature in the module, which is too global a fix for most situations.

- Aloro

Posted: Sat Nov 20, 2004 11:20 pm
by Starslayer_D
Thank you Aloro.

Posted: Thu Dec 16, 2004 6:53 am
by Gairus
You get the cat wand working, star? I'd love to be able to make use of yer work and modify it slightly for something similar :)