Jump to content

negativ spawntimesecs for gameobjects and Script spawn


Guest breakwater

Recommended Posts

I have this Gameobject

name: Twilight Portal

id: 193988

type: 10 (Goober)

spawntimesecs in gameobject table : -30

Line in Wiki for spawntimesecs:

Time in seconds for this object to respawn.

Using a negative value will result in the object starting out by being "despawned" until a script will spawn it. It will then despawn after the amount of time specified here has passed.

How i can "spawn" this gameobject in a script (make visible for players) ?

Thoughts:

the gameobject is spawn (in table gameobject)!

i want use this object for 30 seconds

PLZ help

Thx

Link to comment
Share on other sites

Other Problem: After use the portal is invisible for players, only one player can change phase with trigger spell^^

the manuell way is not good. I hope for a core handling

My hope:

Using a negative value will result in the object starting out by being "despawned" until a script will spawn it. It will then despawn after the amount of time specified here has passed.

I need only the function for "spawn" (make visible) for players.

Link to comment
Share on other sites

Using a negative value will result in the object starting out by being "despawned" until a script will spawn it. It will then despawn after the amount of time specified here has passed.

Last time I checked it wasnt working: this type of GO with negative value despawns after first player use, no matter specified time (and for OS means only one player can enter the Twilight portal, and this is not right since it should last 30 secs)

If I recall correctly data5 e data3 fields are not used in this case and while trying to figure what's wrong I got lost in:

GameObject::Update
// since pool system can fail to roll unspawned object, this one can remain spawned, so must set respawn nevertheless
           m_respawnTime = m_spawnedByDefault ? time(NULL) + m_respawnDelayTime : 0;

Link to comment
Share on other sites

Maybe we can change the type to "GAMEOBJECT_TYPE_SPELLCASTER = 22"

Then we can work with phaseMask to "spawn" or "despawn" the portal. Thanks to kb_z for the hack^^

Each portal (in dalaran, shattrath) has the type 22. I have never hear that the portal disappear :D

I know that is a hack, but a good one in my opinion. What is your opinion for this solution?

I also know, the better place for this is in ScriptDev2 or UDB forum, but i hope, that this reach more persons.

Maybe someone has a core solution (mangos Forum :P) with no hack.

Link to comment
Share on other sites

×
×
  • 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