verb
ActivateBattleMode(mob/M in world)
set category = "Admin"
world<<"Battle Mode has Begun!"
M.verbs+=/mob/AdminFight/verb/Attack
verb
DeActivateBattleMode(mob/M in world)
set category = "Admin"
world<<"Battle Mode has Ended!"
M.verbs-=/mob/AdminFight/verb/Attack
ID:178254
Jun 4 2002, 1:39 pm
|
|
In response to spectriplex
|
|
woooo, lots of errors, i tried tabbing in every way :-(verb
ActivateBattleMode() for(mob/M as mob in world) M.verbs+=/mob/AdminFight/verb/Attack world << "Battle Mode has Begun!!!!!" |
In response to Branks
|
|
verb |
In response to Malver
|
|
These are still giving me errors, the for is not working at all.
ERRORS--> New_GM.dm:622:error:mob:undefined var New_GM.dm:622:error:M:undefined var New_GM.dm:623:error:M.verbs:undefined var New_GM.dm:622:/ :warning: statement has no effect New_GM.dm:622:error::bad assignment mob verb ActivateBattleMode() for(mob/M as mob in world) M.verbs+=/mob/AdminFight/verb/Attack world << "Battle Mode has Begun!!!!!" |
In response to Branks
|
|
Sorry for "bumping" but it finally works :-D
I'll show ya, i had to add "set src in world" which had helped. verb ActivateBattleMode(mob/M as mob in world) set category = "Admin" set src in world world<<" ======================= " world<<"<font size=4><font color=aqua>Battle Mode has Ended!" world<<" ======================= " M.verbs+=/mob/AdminFight/verb/Attack |
In response to Branks
|
|
It seems my success was not for real :-(
Everytime i click Activate Battle Mode, it just brings up a box and lets me choose 1 mob to activate on. I want it so it activates for all mobs in my world. verb ActivateBattleMode(mob/M as mob in world) set category = "Admin" set src in world world<<" ======================= " world<<"<font size=4><font color=aqua>Battle Mode has Begun!" world<<" ======================= " M.verbs+=/mob/AdminFight/verb/Attack |
In response to Branks
|
|
Branks wrote:
It seems my success was not for real :-( What everyone else gave you works just fine. Your problem is either with indentation, or somewhere else. mob/verb/BattleMode() Alathon\\ |
In response to Alathon
|
|
excellent work Alathon ;-)
now one more thing im trying to do, and thats getting a certain attack to go over my opponent (landing on them.) The icon is bdagger.dmi heres the command--> mob proc Blade_Dagger() proc Blade_Dagger(mob/M in oview(1)) set category = "Combat" view() << sound('blade_dagger.wav') var/damage = rand(10,20) usr<<"You use <font color=red>Blade Dagger</font color=red> on [M] For [damage]!" M<<"[usr] uses <font color=red>Blade Dagger</font color=red> on you For [damage]" usr.mp-=3 |
The for command is very useful.
mob
verb
ActivateBattleMode()
for(mob/M as mob in world)
M.verbs+=/mob/AdminFight/verb/Attack
world << "Battle Mode has Begun!!!!!"
I think that should work.