Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 28.01.2006, 15:34   #1
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default [Sharin] SOE to towns (c4)

ok in c4 there's soe to towns and special places,
easy to do, just summon a npc then teleport master to spot, then despawn
here is the working ai

Code:
class summon_tp_talking : default_npc
{
parameter:
	int x = -83964;
	int y = 242680;
	int z = -3700;
		
handler:
	EventHandler CREATED()
	{
		SetTimerPeriodByTick(100);
		InstantTeleport(myself.master, x, y, z);
	}
	EventHandler TIMER_FIRED()
	{
		SetTimerPeriodByTick(0);
		Despawn();
	}
}

only thing is it doesn't despawn, im sure it's a simple syntax error,
can someone help me?
hamidouch is offline  
Old 28.01.2006, 16:40   #2
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

make a summon skill for this npc, so the duration of the "escape scroll" will be the summoning npc time. make the ai to teleport you instantly when it is spawned and die automatically at the same proccess
top-gear is offline  
Old 28.01.2006, 17:29   #3
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

thks, but if u read code its what i did,
my questio nwas : when i set timer like that, the npc doesnt despawn,
theres a lil error in ai code, thats what i need to know
ty anyway
hamidouch is offline  
Old 28.01.2006, 17:58   #4
paul
Архивный участник
 
Join Date: Feb 2005
Posts: 390
Default

The shared skill of quiver of A grage and S grade despawn an NPC. Perhaps you could use some coding from that.
paul is offline  
Old 28.01.2006, 17:59   #5
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

yes thats what i did, the rerror was i used SetTimerPeriodByTick,
and the right function is addtimerex,
fixed it thks ^^
hamidouch is offline  
Old 28.01.2006, 18:00   #6
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

here is working code :

Code:
class summon_tp_talking : default_npc
{
parameter:
	int x = -83964;
	int y = 242680;
	int z = -3700;
		
handler:
	EventHandler CREATED()
	{
		AddTimerEx(39999, 100);
		InstantTeleport(myself.master, x, y, z);
	}
	EventHandler TIMER_FIRED_EX(timer_id)
	{
	  if (timer_id == 39999)
		Despawn();
	}
}
hamidouch is offline  
Old 28.01.2006, 20:35   #7
Domzelan
Архивный участник
 
Join Date: Apr 2005
Posts: 599
Default

I think only some people - can rewrite it in ai but anyway - thx. Good work.
Domzelan is offline  
Old 29.01.2006, 01:33   #8
Mayii
Архивный участник
 
Join Date: Aug 2005
Posts: 113
Default

ever heard of 'nasc' ? try to use your brain before talking crap. and anyways it's damn easy to "transform" it manually into object code.
Mayii is offline  
Old 29.01.2006, 09:38   #9
Flamestrike
Архивный участник
 
Join Date: Aug 2005
Posts: 434
Default

Yeah...kinda simple.
Flamestrike is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:00.