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

[SOLVED] Emote problem

Status
Not open for further replies.

mjafko

Epic Member
Hey guy's.

I have 2 question. Well EmoteState (65) wont set my gossip to a dead state. Anyone know's what am I doing wrong ?
Second Is SetStunned <- always give me error is nil value.

Well NpcId is gossip id and gossip spawncreature.


Code:
function GossipSummonWB.OnJustSummonedCreature (event, creature, summon)
	--summon:SetStunned(true);
	creature:RegisterEvent( GossipDieEmote, 1000, 1 )
end
	function GossipDieEmote ( event, duration, cycles, creature )
			creature:EmoteState( 65 ); -- Should be dead emote
	end

RegisterCreatureEvent( NpcId, 19, GossipSummonWB.OnJustSummonedCreature )
 

Tommy

Founder
:SetStunned is not an active method, however, you can go to LuaFunctions.cpp and uncomment it; beware that it could cause compile problems when you do that though.

Is there a purpose you are wanting to set the dead emote state on the creature? Do you want players to continue to talk to this npc? If not, I'd just kill the npc instead of setting its emote state, but if you want to keep him alive perhaps you should consider setting :EmoteState(emoteState) and :SetDeathState(deathState). Not entirely sure if it'll work or what is generally happening.
 

mjafko

Epic Member
Well ye I maked this changes for core. But I in code up if I uncommend summon:SetStunned(true) I get is nil value error. Maybe any reson I missed something ?

Hmm :SetDeathState(deathState) <- what to put as argument in there ? Like it is or ?
 

Tommy

Founder
Well ye I maked this changes for core. But I in code up if I uncommend summon:SetStunned(true) I get is nil value error. Maybe any reson I missed something ?

Hmm :SetDeathState(deathState) <- what to put as argument in there ? Like it is or ?

Just pointing out (again): As I mentioned it probably won't make a difference, but it makes sense. I can't test so I don't know if it'll work, regardless it is worth trying.

Here's enumerator types for death state:

Code:
enum DeathState
{
    ALIVE          = 0,
    JUST_DIED      = 1,
    CORPSE         = 2,
    DEAD           = 3,
    JUST_RESPAWNED = 4
};
 
Status
Not open for further replies.
Top