![]() |
callnpc param's
NPC Code: now how do i make an npc read the param 50 for the flag hit? |
i never knew callnpc had params..
normal callnpc (and i think u know this) if just like callnpc whatever,hi; then on the npc if (hi) { setcharprop #c,hi; } |
Quote:
|
triggeraction is like
triggeraction playerx,playery,trigger,; then on the npc .. if (actiontrigger) { whatever } but i dunno how to use the param on it |
Triggeraction params are like gani aparms almost. ITs all string based so if you wanted a triggeraction to hit a person for like 1 damage (Would make more sence with hitobjects though) then...
NPC Code: and the other person must have a weapon with contains NPC Code: |
Quote:
i hardly ever use trigger action and when I do I dont really need params |
*smacks head*
yeah its trigger action that has parameter. |
*hits Warcaptain with a salmon and knocks him unconscious*
Whoops! :( ... :D |
!Error
From experience, it sends strings, not integers. triggeraction this.testx,this.testy,hit,#v(50); if(actionhit){ if(this.justhit<1){ this.justhit=50; hearts-=strtofloat(#p(0)); } } if(playerenters||timeout){ if(this.justhit>0) this.justhit--; timeout=0.05; } |
say wha .... ???
|
Sorry, that should be #v(swordpower)...
if you're sending a variable, you gotta wrap it in #v() or it'll just send the name of the variable, ie "1" instead of "swordpower" triggeraction this.testx,this.testy,fish,#v(this.oldpower); this.damage=strtofloat(#p(0)); |
All times are GMT +2. The time now is 02:17 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.