Jump to content
  • 0
Sign in to follow this  
Nidhogg

Doubts/Problems with Timers, doesn't work

Question

Hello there C:

 

Here is my Code, and I think here is where I'm getting the error I have:

RespawnNivel1:	OnTimer0:		attachnpctimer;		set $@npcaesconder$,""+strnpcinfo(0)+"";		npctalk "Espera | "+$@npcaesconder$+"";		initnpctimer ""+strnpcinfo(0)+"";		end;	OnTimer1:		stopnpctimer ""+strnpcinfo(0)+"";		npctalk "Listo | "+$@npcaesconder$+"";		detachnpctimer;		end;

I have multiple NPCs running on the same script (duplicates), so that's why I write "+strnpcinfo(0)+" on the arguments.

 

The error I got when running is that, ingame, the NPC doesn't show me the things on OnTimer1: label, and I don't know why,

the NPC says "Espera | 'NPCname'", but never says "Listo | 'NPCname'" :C

 

 

Help please C:

Thank you ;D

Edited by Nidhogg

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I think you have a different view on OnTimer.

 

try to read this [WIKI] initnpctimer

 

 

I don't know why,

the NPC says "Espera | 'NPCname'", but never says "Listo | 'NPCname'" :C

 

Help please C:

Thank you ;D

Because you set it in wrong location..

RespawnNivel1:+	set $@npcaesconder$,""+strnpcinfo(0)+"";	OnTimer0:		attachnpctimer;-		set $@npcaesconder$,""+strnpcinfo(0)+"";		npctalk "Espera | "+$@npcaesconder$+"";		initnpctimer ""+strnpcinfo(0)+"";		end;	OnTimer1:		stopnpctimer ""+strnpcinfo(0)+"";		npctalk "Listo | "+$@npcaesconder$+"";		detachnpctimer;		end;

+ Add this code

- Remove this code

		set $@npcaesconder$,""+strnpcinfo(0)+""; //should set outside 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.