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

Moderator: Event DM

Post Reply
Starslayer_D
Master Sage
Posts: 5178
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)
Contact:

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

Post by Starslayer_D » Wed Nov 17, 2004 12:23 pm

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. :(.
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly
User avatar
Krator
Elder Sage
Posts: 4935
Joined: Thu Jun 10, 2004 6:44 pm
Timezone: GMT
Location: Amsterdam

Post by Krator » Wed Nov 17, 2004 1:34 pm

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.
Playing as: Sir Douglas Hope of Gorethar, old school paladin | Krator Blackfist, gold mage | Warren, half nymph barbarian
User avatar
Sindol
Team Member; Retired with Honors
Posts: 6479
Joined: Mon Jan 06, 2003 4:23 pm
Location: Nijmegen - Netherlands (GMT+1)
Contact:

Post by Sindol » Wed Nov 17, 2004 1:43 pm

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.
So much fun,
yet so little time to enjoy it.
- Sindol
User avatar
Xandor Amakiir
Apprentice Scholar
Posts: 661
Joined: Sun Jun 20, 2004 10:09 am
Location: Holland gmt +2
Contact:

Post by Xandor Amakiir » Wed Nov 17, 2004 3:04 pm

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...
Journeyman to the AKN
Skald of Fury
Owner of the Lore Shop "Elysia"

Stories of a 1001 planes...

Image

Image
Starslayer_D
Master Sage
Posts: 5178
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)
Contact:

Post by Starslayer_D » Wed Nov 17, 2004 3:29 pm

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)
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly
Starslayer_D
Master Sage
Posts: 5178
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)
Contact:

Post by Starslayer_D » Sat Nov 20, 2004 7:14 pm

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 :( )
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly
User avatar
Krator
Elder Sage
Posts: 4935
Joined: Thu Jun 10, 2004 6:44 pm
Timezone: GMT
Location: Amsterdam

Post by Krator » Sat Nov 20, 2004 9:00 pm

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.
Playing as: Sir Douglas Hope of Gorethar, old school paladin | Krator Blackfist, gold mage | Warren, half nymph barbarian
User avatar
Aloro
Team Member; Retired with Honors
Posts: 12805
Joined: Sat Dec 28, 2002 5:11 am
Location: Rainbow's End
Contact:

Post by Aloro » Sat Nov 20, 2004 9:04 pm

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
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.
Starslayer_D
Master Sage
Posts: 5178
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)
Contact:

Post by Starslayer_D » Sat Nov 20, 2004 11:20 pm

Thank you Aloro.
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly
Gairus
Team Member; Retired with Honors
Posts: 4009
Joined: Tue Sep 16, 2003 3:15 pm
Location: East Australia GMT +10

Post by Gairus » Thu Dec 16, 2004 6:53 am

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 :)
Post Reply