Forum

> > Stranded II > Scripts > My Cooking Pike doesn't seem to want to work right
Forums overviewStranded II overview Scripts overviewLog in to reply

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

6 replies
To the start Previous 1 Next To the start

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

Zandorum
User Off Offline

Quote
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";
          }
     }

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

Assassin moder
User Off Offline

Quote
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 ?
edited 1×, last 31.12.13 01:15:40 pm

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

Hurri04
Super User Off Offline

Quote
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.

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

Zandorum
User Off Offline

Quote
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.

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

Hurri04
Super User Off Offline

Quote
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){
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview