Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   AI - NPC with limited life time (https://postpacific.loc-online.com/showthread.php?t=2111)

krapno 06.10.2005 13:51

AI - NPC with limited life time
 
Hi,

i am looking for AI in order to implement for some NPC a limited "time of life", i mean when that NPC is spawned (manually or not) the NPC will automatically disappear (or die) after a precised time...

Any idea is welcome, i dunno if it is possible :)

hamidouch 06.10.2005 14:14

use toma teleport AI
and make it teleport to a dead land place

Sauron 06.10.2005 14:15

[php:1:a60f5d472a]
class name : (null)
handler 13 // CREATED
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_const 1
push_const 19000 // time in ms
func_call 28 // func[AddTimerEx]
shift_sp -2
shift_sp -1
handler_end

handler 12 // TIMER_FIRED_EX
variable_begin
"timer_id"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // timer_id
push_const 176
add
fetch_i
push_const 1
equal
branch_false L2
L1
shift_sp 1
func_call 175 // func[Despawn]
shift_sp -1
L2
handler_end

class_end
[/php:1:a60f5d472a]

krapno 06.10.2005 16:30

tx a lot Sauron, i am going to test it soon :)


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