• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Talk on spawn

Status
Not open for further replies.

Lightning Blade

BETA Tester
So basically i want this one creature to spawn this creature, which works perfectly now this creature doesn't work to well :S.


 

Tommy

Founder
Because your arguments are wrong. For RegisterEvent function argument it is, "event, delay, pCall, creature". You also have the hook wrong, it should be 23 (CREATURE_EVENT_ON_RESET) not 22. http://wiki.emudevs.com/doku.php?id=eluna_hooks_registercreatureevent

Code:
local npcId = 200001
     
function OnSpawn(event, creature)
    creature:SetFaction(35)
    creature:RegisterEvent(Talk1, 12000, 1)
end
     
function Talk1[COLOR="#00FF00"](event, delay, pCall, creature)[/COLOR]
    creature:SendUnitSay("Hahaha, oh captain! You meager little rat!  You really believe you can take down the Bloodline Empire's top dark alchemist? HA! Killing you will be just as easy as making a mana potion!", 0)
end
     
RegisterCreatureEvent(npcId, [COLOR="#00FF00"]23[/COLOR], OnSpawn)
 
Last edited:

Lightning Blade

BETA Tester
Sorry for being so stupid

- - - Updated - - -

Now it says that hydrax is attempting to index local 'creature' ( a number value )
 

Lightning Blade

BETA Tester
Thanks i used 23 now, i was about to test it but then you told me the arguments were wrong so i tried with 22 again was about to test with 23 when i refreshed to see your edited comment
 
Status
Not open for further replies.
Top