Forum

> > Stranded II > Scripts > Scripting Questions
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Scripting Questions

2.429 Antworten
Seite
Zum Anfang Vorherige 1 247 48 49121 122 Nächste Zum Anfang

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
What does the waterpipe do? I thought it would fill with water in the rain, but it doesn't. I set a map to always rain and tested. I'm not sure if it didn't fill because the map started out raining and it missed a trigger or what. It has a behavior in the ini files, but what is it for?
1× editiert, zuletzt 21.09.08 00:27:38

alt Re: Scripting Questions

HudaJan
Super User Off Offline

Zitieren
Well.
As you can notice the emty pipe and full pipe models are almost the same...
So you could make that it fills in the rain (hint: You can look the script up at water rock full/empty )

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
HudaJan hat geschrieben
Well.
As you can notice the emty pipe and full pipe models are almost the same...
So you could make that it fills in the rain (hint: You can look the script up at water rock full/empty )


Well, of course one could do this, but I just was wondering if the waterpipe did it already before I messed with it.

alt Re: Scripting Questions

Amritsar
User Off Offline

Zitieren
If your referring to the one from Massive Mod (you are right?)

Then yes it does, I've used it before and seen it do so. I'm pretty sure it only triggers when the rain starts though.

I do have my own question though.

Is it possible to detect what sought of texture the player is standing on? Like could I tell if they are standing on sand as opposed to grass?

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
Amritsar hat geschrieben
If your referring to the one from Massive Mod (you are right?)


I don't use Massive Mod. I'm referring to the regular one. What does its behavior mean?

alt Re: Scripting Questions

Amritsar
User Off Offline

Zitieren
I really must of been out of circulation of the Stranded community for a while...

I don't remember a water pipe?

Maybe it was from the original that I was talking about anyway...

Is what we're discussing a long hollowed out log help up with branches/poles whatever?

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
Amritsar hat geschrieben
I really must of been out of circulation of the Stranded community for a while...

I don't remember a water pipe?

Maybe it was from the original that I was talking about anyway...

Is what we're discussing a long hollowed out log help up with branches/poles whatever?


Yes. It's an object from the original stranded, it just can't be built. It doesn't matter, I already figured it out. Thanks anyway.

New problem. What's wrong in here? I'm trying to add a light state, and then remove it after a timer. When tested, the state is added, the eating happens, the bottle is created, but it freaks over the timer saying it expected a semicolon. I've never used timers, what did I do wrong?

     on:eat {
          process "eating",3000;
          eat 0,15,3,0;
          local $id;
               $id=create("item",106);
               store $id,"unit",1;
          addstate "unit",1,"light";
          statevalue "unit",1,"light",5;
          timer 0,8000,1,freestate "unit",1,"light";
     }

I think I'm supposed to have some tmp's and =='s in there, but I don't know where to start.
2× editiert, zuletzt 22.09.08 03:03:05

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
on:eat {
          process "eating",3000;
          eat 0,15,3,0;
          local $id;
               $id=create("item",106);
               store $id,"unit",1;
          addstate "unit",1,"light";
          statevalue "unit",1,"light",5;
          timer 0,8000,1,freestate("unit",1,"light");
     }

Try that, that might be the issue. <_<

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
GreyMario hat geschrieben
on:eat {
          process "eating",3000;
          eat 0,15,3,0;
          local $id;
               $id=create("item",106);
               store $id,"unit",1;
          addstate "unit",1,"light";
          statevalue "unit",1,"light",5;
          timer 0,8000,1,freestate("unit",1,"light");
     }

Try that, that might be the issue. <_<


No dice.

alt Re: Scripting Questions

humer
User Off Offline

Zitieren
Yes, because the last row isn't correct, try this instead

1
2
3
4
5
6
7
....
timer 0,8000,1,"timer";
}

on:timer {
	freestate"unit",1,"light";
}

alt Re: Scripting Questions

ESKARN
User Off Offline

Zitieren
is there anyway to make a raptor (or any unit) attack another unit
eg raptor attack a monkey

can you change the color of the water for only one map?
2× editiert, zuletzt 22.09.08 12:37:58

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
humer hat geschrieben
Yes, because the last row isn't correct, try this instead

1
2
3
4
5
6
7
....
timer 0,8000,1,"timer";
}

on:timer {
	freestate"unit",1,"light";
}


Awesome, man, thanks a lot.

DontKnowToScript hat geschrieben
1
2
3
if (gety("unit",1)<0){
addstate "unit",1,"wet";
}
add this to game.inf and see that you get wet state.


Didn't work for me. Said unit with ID 1 doesn't exist.

I'm not sure if it has to do with where I put it, but it only makes me wet when I try to sleep in the water.
2× editiert, zuletzt 22.09.08 23:52:16

alt Re: Scripting Questions

bezmolvie
User Off Offline

Zitieren
Because when you sleep, it registers how high you are. set a timer for a half a second or so, and then order it to check the players height

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
Bloodshot hat geschrieben
Because when you sleep, it registers how high you are. set a timer for a half a second or so, and then order it to check the players height


Would that be expensive system-wise?

EDIT: Nevermind. Got a loop working and it's smooth as silk.

DontKnowToScript hat geschrieben
about changing the water color,use s2 cmd watertexture
and write a path to an image file (eg:water_dark)


Where would I do this? Like, which file do I use it in?

I also have a problem with my campfire. I'm trying to make it dry the player off instead of only removing frostbite.
1
2
3
4
5
6
7
8
9
10
on:use {
		if (gotstate("unit",1,6))or(gotstate("unit",1,11)){
			if ((gotstate("self",4)+gotstate("self",5))>0){
				process "warming up",3000;
				freestate "unit",1,6;
				freestate "unit",1,11;
		}else{
			msgbox "Campfire","sys/scripts/fireplace.s2s";
		}
	}
It tells me it's expecting a { on row 5.
3× editiert, zuletzt 23.09.08 01:17:54

alt Re: Scripting Questions

DC
Admin Off Offline

Zitieren
add some brackets. the whole if-condition has to be bracketed. "or" was not bracketed in your script.
1
if [b]([/b](gotstate("unit",1,6))or(gotstate("unit",1,11))[b])[/b]{

and you forgot an "}". you have 4 "{" but only 3 "}". this can't work.

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
DC hat geschrieben
add some brackets. the whole if-condition has to be bracketed. "or" was not bracketed in your script.
1
if [b]([/b](gotstate("unit",1,6))or(gotstate("unit",1,11))[b])[/b]{

and you forgot an "}". you have 4 "{" but only 3 "}".this can't work of.


Sweet, thanks man.

EDIT: Oh, the other "}", thanks, haha. Fixed everything.
Zum Anfang Vorherige 1 247 48 49121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht