Jump to content

Recommended Posts

Posted

I'm taking my first swing at scripting (nothing offy like but just for learning) I'm trying to create an item with a script effect that will summon an object, however looking at the core i can only find SummonCreature is there not a function that does the same but for game objects?

Edit: I should note I want this to be a temporary summon with despawn time

Another Edit: I think I found what i'm looking for, (i removed most args to keep it short)

bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, ....)

I just want to make sure I don't save it to the DB, and use it the way it is used in SpellEffects.cpp

So now I just want to know if my assumptions are correct

Edit again: Ha so i'm just confusing my self more and more, I think should be using DynamicObject::Create(...)

Posted

This is currently by design not implemented (see many discussion topics about this..)

If you really really need such a function, I suggest to look into the code for SPELL_EFFECT_SUMMON_GAMEOBJECT_WILD (or something similar), you need the code that is used there.

Posted

Yes, either it should be spawned by a spell, or always spawn in the same place in which case you can put it in the DB in a despawned state and spawn it through the script. Summoning objects anywhere without a spell never happens on retail so it isn't present in mangos.

Posted

Ok thanks to both of you

I did see the Lava Bomb related code but also noticed the // Hack alert! and was just hoping there was a more proper way to do it. What i'm wanting to make is not official like at all, and is NOT something that I would try to have added to core or sd2. Just wanted a little learning experience with scripting, and the parts about creating a script, adding reference to it in db and actually seeing it in action that's what I want to learn about

But again thanks for pointing me in the right/hacky direction, I'll probably just summon a temp creature to avoid using something that is not correct since this is just for learning and i don't want to get into a habit of doing something wrong

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use