Forum

> > Stranded II > Scripts > Scripting Questions
Forums overviewStranded II overview Scripts overviewLog in to reply

English Scripting Questions

2,429 replies
Page
To the start Previous 1 240 41 42121 122 Next To the start

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
Bloodshot has written
Both: if u guys are making mods, why don't you help with a mod that's out, like "My Stranded?


Ah, well it's alright, I already had some glow hooked to the object on creation, then I just had to skipevent drop with use and make use create a new one while getting rid of the old one. (That butterfly-dropping script is a godsend for reference.)

I'm just making this game work the way I want it to, all the other mods I've seen are kind of far-fetched for a guy stuck on an island. I'm just trying to expand what I can do, and not make it too out-there for Stranded.

There's a lot in the other mods that I don't like very much. If my little project gets large enough, I could upload it as a mod and let other people use it in theirs', but right now this is my baby, and I wouldn't want to fuse it with anyone else's. Either way, thanks for all your help.

(Plus, my item scripts are so messy it'd make you vomit.)

But right now, I'm having problems with combining three fireflies and a bottle to make a Firefly Lantern, (the item I just got working right).

I've written a combination, checked the item id's and made it gen the lantern's id. He still won't do it in-game. I don't know what's wrong.

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
Bloodshot has written
Is there a script=end(if there is a script) and a combi=end on the combination before?


This is what I have. I used Wilson as a base so I just ripped the script that adds a diary entry out and switched some object references.

### Firefly Lantern (Firefly + Bottle)
combi=start
id=fireflylantern
req=125,3
req=106
gen=128
combi=end

old Re: Scripting Questions

Raven Shadow
User Off Offline

Quote
Bloodshot has written
Bloodshot has written
Tyvm to you all... I'll test it after dinner. I was checking on:use and not change day so that's why i didn't find a problom. alright, what's wrong here-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
on:use {
	if((playergotitem 9)>0) {
		$hunger--;
		freestored "unit",1,9,1;
		play "eat.wav";
	}elseif((playergotitem 11)>1){
		$hunger--;
		freestored "unit",1,11,2;
		play "eat.wav";
	}else{
		msg "I need raw meat to feed him!",3;
		speech "negitive";
	}
	}
no real errors but even when i have meat it says "I need raw meat to feed him!"
Still unanswered


Sorry buddy, but i hope you don't mind my snickering
at what has happened to you (and your code)

You've run head first into a major flaw in the online
S2 script reference .....

Many commands require data be contained in ()
but the online documentation and even the game editor
don't tell you which ones do.

Make the following changes to your code and it will work
1
2
3
4
5
6
7
8
9
10
11
12
13
14
on:use { 
     if(playergotitem(9)>0) { 
          $hunger--; 
          freestored "unit",1,9,1; 
          play "eat.wav"; 
     }elseif(playergotitem(11)>1){ 
          $hunger--; 
          freestored "unit",1,11,2; 
          play "eat.wav"; 
     }else{ 
          msg "I need raw meat to feed him!",3; 
          speech "negative"; 
     } 
}

Please notice the typo you made at the end too.
"negitive" should be "negative"

old Re: Scripting Questions

Raven Shadow
User Off Offline

Quote
jockmo42 has written
Bloodshot has written
Both: if u guys are making mods, why don't you help with a mod that's out, like "My Stranded?


Ah, well it's alright, I already had some glow hooked to the object on creation, then I just had to skipevent drop with use and make use create a new one while getting rid of the old one. (That butterfly-dropping script is a godsend for reference.)

I'm just making this game work the way I want it to, all the other mods I've seen are kind of far-fetched for a guy stuck on an island. I'm just trying to expand what I can do, and not make it too out-there for Stranded.

There's a lot in the other mods that I don't like very much. If my little project gets large enough, I could upload it as a mod and let other people use it in theirs', but right now this is my baby, and I wouldn't want to fuse it with anyone else's. Either way, thanks for all your help.

(Plus, my item scripts are so messy it'd make you vomit.)

But right now, I'm having problems with combining three fireflies and a bottle to make a Firefly Lantern, (the item I just got working right).

I've written a combination, checked the item id's and made it gen the lantern's id. He still won't do it in-game. I don't know what's wrong.

there's probably a s2 cmd lockcombis command in use
somwhere, look for it, or enter your own code to unlock
your test combi after the game loads.

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
Raven Shadow has written
there's probably a s2 cmd lockcombis command in use somwhere, look for it, or enter your own code to unlock your test combi after the game loads.


Awesome, thanks for the help, but it turns out I just had the definition for the firefly wrong.

Ah, now I'm going to want to know what these three numbers mean in the things you find while hitting the lion stone.

find=23,60,1
find=21,60,10
find=11,20
find=71,15

If the first number in a row is the object, what are the other numbers for?

Thanks.
edited 2×, last 26.08.08 03:04:06 am

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
Bloodshot has written
It's item number, rareity, and maximum amount of item's found at one time.


Thanks a lot.
edited 2×, last 28.08.08 08:42:05 am

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
thanks on help BloodShot
EDIT: the kiwi and others dont lay their nest... did u find some mistakes in the code?
edited 1×, last 26.08.08 11:01:20 am

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
Bloodshot has written
A nest pops up right where the kiwi is at midnight. It'll only happen every three days

no... i waited three days ,nothing happen
btw:how do i make fire that is under a shelter to not go down when raining?

old Re: Scripting Questions

bezmolvie
User Off Offline

Quote
Use a script like this:
     on:hit {
          if(getplayerweapon(torch or flint)==1 {
               addstate "self","eternal Fire";
          }elseif(getplayerweapon(torch or flint)==1 {
               addstate "self","eternal Fire";
          }
     }

old TEXTURE HELP

darksol
User Off Offline

Quote
I making a model for stranded 2 using blender and exporting it to .3ds i have the folder and the model in the same file but it is all white can any one help me

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
I'd like to know if there would be a way to link the kind of loot you get from a creature to the states it had before death.
edited 1×, last 28.08.08 08:41:40 am

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
Bloodshot has written
Use a script like this:
     on:hit {
          if(getplayerweapon(torch or flint)==1 {
               addstate "self","eternal Fire";
          }elseif(getplayerweapon(torch or flint)==1 {
               addstate "self","eternal Fire";
          }
     }

i dont get it ,whats the difference between fire and eternal fire?
EDIT: and where to put the script?
EDIT AGAIN:lol and there is no script with any connection to shelter in what u written
edited 1×, last 28.08.08 09:32:03 am

old Re: Scripting Questions

humer
User Off Offline

Quote
You can't build a fireplace under a shelter in game because they will overlap, only in editor. The script has to be put in definition of fireplace, or just into the fireplace. The difference is that an eternal fire, as the name already says, doesn't go out by raining. When you want an eternal fire in editor you can use the "eternal flame state" instead of using the script.

The script has only one mistake.

1
2
3
4
5
6
7
8
on:hit {
	if (getplayerweapon(torch ID)==1) {
		addstate "self","eternal Fire";
	}
	elseif (getplayerweapon(flint ID)==2) {
		addstate "self","eternal Fire";
	}
}

Now it should work I think!

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
no. It won't work, sorry.
Ths is right form:
1
2
3
4
5
6
7
on:hit { 
	if(getplayerweapon()==torch ID){ 
		addstate "self","5"; 
	}elseif(getplayerweapon()==flint ID){ 
		addstate "self","5"; 
	} 
}
And the difference betwen fire and eternal fire - Fire damages, eternal fire don't

old Re: Scripting Questions

humer
User Off Offline

Quote
ohh thanks huda jan, seems like i confound there something. I was a little bit busy. Sorry
To the start Previous 1 240 41 42121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview