Forum

> > Stranded II > Scripts > My Cooking Pike doesn't seem to want to work right
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch My Cooking Pike doesn't seem to want to work right

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt My Cooking Pike doesn't seem to want to work right

Zandorum
User Off Offline

Zitieren
Ok so I'm working on making a Cooking Pike use a script menu ONLY when an object nearby is on fire.

Now It seems with how I have it now its if the player is close to a nearby fire... What have I done wrong? Also If someone could show me how to make it check if a campfire is in range.

     on:use {
          if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
               dialogue "start","sys/scripts/campfire.s2s";
          }else{
               msg "I need a fire.",3;
               speech "negative";
          }
     }

alt Re: My Cooking Pike doesn't seem to want to work right

Assassin moder
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
on:use {
	if ((count_inrange("state",5,50)) or (count_inrange("state",4,50))>0){
		dialogue "start","sys/scripts/campfire.s2s";
	}else{
		msg "I need a fire.",3;
		speech "negative";
	}
}

is it work now ?
1× editiert, zuletzt 31.12.13 13:15:40

alt Re: My Cooking Pike doesn't seem to want to work right

Hurri04
Super User Off Offline

Zitieren
how about you tell us what exactly is happening if it "doesnt seem to want to work right".
from your description I dont know exactly what you want either.

> does something happen at all?
     > if yes: what does happen?
     > is this supposed to happen?
          > if not: what is supposed to happen instead?

to me the script you posted looks fine which is most likely because you copied it from somewhere.

alt Re: My Cooking Pike doesn't seem to want to work right

Zandorum
User Off Offline

Zitieren
I thought I made my self clear in my topic though. hmm.

Well essentially if Im more than a few steps away from the Pike and use it it will say "I need a fire" even if there is a fire. What I was shooting for was instead of the player needing to be close to the fire that the Pike needs to be close to the fire.

As of right now I need to be close to the fire for it to work.

alt Re: My Cooking Pike doesn't seem to want to work right

Hurri04
Super User Off Offline

Zitieren
so the pike is something the player can drop near a fire and walk away instead of having to hold it in his hands the whole time?

in that case try using the parameter of the s2 cmd count_inrage command that lets you specify another object:
1
if ((count_inrange("state",5,50, "self")) or (count_inrange("state",4,50 "self"))>0){
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht