![]() |
|
|
#1 |
|
Архивный участник
Join Date: Mar 2005
Posts: 475
|
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? |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Aug 2005
Posts: 605
|
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
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Mar 2005
Posts: 475
|
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 |
|
|
|
|
#4 |
|
Архивный участник
Join Date: Feb 2005
Posts: 390
|
The shared skill of quiver of A grage and S grade despawn an NPC. Perhaps you could use some coding from that.
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Mar 2005
Posts: 475
|
yes thats what i did, the rerror was i used SetTimerPeriodByTick,
and the right function is addtimerex, fixed it thks ^^ |
|
|
|
|
#6 |
|
Архивный участник
Join Date: Mar 2005
Posts: 475
|
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();
}
}
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Apr 2005
Posts: 599
|
I think only some people - can rewrite it in ai
but anyway - thx. Good work.
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Aug 2005
Posts: 113
|
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.
|
|
|
|
|
#9 |
|
Архивный участник
Join Date: Aug 2005
Posts: 434
|
Yeah...kinda simple.
|
|
|
|
|