ID:266206
 
Ok here it the code i used:

mob/bat
var/tmp
next_walk_time
walking_delay = 10
movement_percent = 50 of the time should it move?
var/tmp
next_attack_time
attacking_delay = 10
attack_percent = 50

base_EventCycle()


if (next_walk_time <= world.time)
chance that we will walk.
if (prob(movement_percent))
step_rand(src)


next_walk_time = world.time + walking_delay
if (next_punch_time <=world.time)
if (prob(Punch_percent))
verb/attack_rand(src)

return

I get a Procs.dm:26:error:mob/verb/attack_rand:bad var

How can i make it so the ncp can attack people?
Air _King wrote:
Ok here it the code i used:

mob/bat
var/tmp
next_walk_time
walking_delay = 10
movement_percent = 50 of the time should it move?
var/tmp
next_attack_time
attacking_delay = 10
attack_percent = 50

base_EventCycle()


if (next_walk_time <= world.time)
chance that we will walk.
if (prob(movement_percent))
step_rand(src)


next_walk_time = world.time + walking_delay
if (next_punch_time <=world.time)
if (prob(Punch_percent))
verb/attack_rand(src)

return

I get a Procs.dm:26:error:mob/verb/attack_rand:bad var

How can i make it so the ncp can attack people?


verb/attack_rand makes a new verb called attack_rand, I doubt thats what you want..Try attack_rand(src), if you have a proc called that

Alathon
In response to Alathon
Alathon wrote:
Air _King wrote:
Ok here it the code i used:

mob/bat
var/tmp
next_walk_time
walking_delay = 10
movement_percent = 50 of the time should it move?
var/tmp
next_attack_time
attacking_delay = 10
attack_percent = 50

base_EventCycle()


if (next_walk_time <= world.time)
chance that we will walk.
if (prob(movement_percent))
step_rand(src)


next_walk_time = world.time + walking_delay
if (next_punch_time <=world.time)
if (prob(Punch_percent))
verb/attack_rand(src)

return

I get a Procs.dm:26:error:mob/verb/attack_rand:bad var

How can i make it so the ncp can attack people?


verb/attack_rand makes a new verb called attack_rand, I doubt thats what you want..Try attack_rand(src), if you have a proc called that

Alathon


So if I have a verb called attack I put attack_rand(src)?

NEVERMIND I GOT IT