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 222 23 24121 122 Next To the start

old Re: Scripting Questions

Amritsar
User Off Offline

Quote
What behaviour would a land vehicle be? I know it would go in the group Vehicle but what behaviour?

EDIT: Heres the script I'm making.
### Cart
id=226
fx=???
name=Handcart
group=vehicle
icon=gfx\cart.bmp
model=gfx\cart.b3d
colxr=30
colyr=10
scale=1.5
mat=wood
speed=0.8
turnspeed=0.7
health=265
behaviour=???
rideoffset=60
maxweight=30000
sfx=???
script=start
     on:use {
          clear;
          add "You can move the cart or store stuff.";
          add "Which will it be?";
          msgbox "Handcart";
          local $id;
          $id=current_id();
          add "exchange 2,$id;";
          button 0,"Store stuff",19;
          add "ride $id; closemenu;";
          button 1,"Drive the raft",8;
          add "closemenu;";
          button 2,"Do nothing with this raft",3;
          freevar $id;
     }
     on:kill { free "self"; }
     on:build_finish {
          event "sailraftbuild",0,0;
     }
script=end

And yes I know it is a very unproffesional script...

Also what req is fire? As in how would you make a combination require fire?

TRIPLE EDIT: What's wrong with this object_edible? I inspected it and it should work but it doesn't show up in game.

### Beachworm
id=227
name=Beachworm
group=food
icon=gfx\worm.bmp
mat=flesh
weight=7
info=A worm that lives in the sand of coastal areas.
script=start
     on:eat {
          process "eating",1000;
          eat 0,5,-5,0;
     }
     on:use {
          msg "Will be used as bait";
          msg "when I fish!";
     }
script=end

Sorry for all the script and the fact that it takes space
edited 3×, last 07.05.08 10:08:29 am

old Re: Scripting Questions

Raven Shadow
User Off Offline

Quote
Flying Lizard has written
try using the command s2 cmd skycolor


Will that effect the lighting for the entire game
or can it used to effect it in a controlled area?

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
@Amritsar
you need the behaviour vehicle
and for the fire thing you should look up how DC solved it, you need a script in the combination for this.
and for the beachworm I can't see a failure either, and at the moment I don't have the time to test ist aut.

@Raven Shadow
the script itself will afect the whole map, but you can trigger it by using triggers ( )

old Re: Scripting Questions

Amritsar
User Off Offline

Quote
Righto... I just assumed since there are no actual land vehicles that DC wouldn't of wasted time creating a behaviour for them.

And where exactly can this DC solving be found? I searched around all the combi files and some of the massive mod files but I haven't find it.

But thanks for explaining the vehicles thing

old follow

lint35
User Off Offline

Quote
Is it possible to make a unit follow you?

old Re: Scripting Questions

ohaz
User Off Offline

Quote
press space when your mouse is on the object. Some colored points shoud appear. there you can move it

old Re: Scripting Questions

lint35
User Off Offline

Quote
Is is possible to put buttons on an item? I am trying to put buttons on an item so it can play a song is it possible?

old Re: Scripting Questions

Guest

Quote
How would I go about changing the map when a player enters a area and save their stats?

old Re: Scripting Questions

Amritsar
User Off Offline

Quote
What exactly do you mean Xane? Like you finish one map and go onto another but keep your stats?

@lint35: I am a very very bad scripter and modeller but I do know a possible (although rather messy) way to do this. If you made sure the model had a button and then just make it so that on:hit the song plays.

See what I mean by messy? Just a suggestion incase nothing else works.

BTW: Possible problem is that it would probably take damage every time you hit it =-(. Also there is probably a way to make it so you have to hit the button (or the general area) to make the song work.

Now on to my question.
Can you make bonus damages affect just an object rather than said objects material?

Eg. I want to make a plant and said plant will be easily cuttable with a machette because it takes an extra 25+ damage. Is there anyway to make this specific plant take the damage rather than making all things of the same material (which would theoretically be wood/leaf) take the extra 25?

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
@lint
you could use s2 cmd dialogue

@Xane
in s2 cmd loadmap there are parameters for that. You just have to set them to 1

@Amritsa
it's basicaly the same script as the one for extra damage to materials. You just have to check if the object beeing hit is the correct type. You can use s2 cmd type for that

old Re: Scripting Questions

Amritsar
User Off Offline

Quote
Example please? Sorry but I really have no idea. I know how to do the material damage bonuses but how would you do type?

Would it be like the material except
on:impact
if:type=(insertobjecthere)

?

old Re: Scripting Questions

Guest

Quote
Amritsar has written
What exactly do you mean Xane? Like you finish one map and go onto another but keep your stats?

Yes, exactly. I know nothing of scripting and don't really care to learn so if someone could tell me exactly what trigger to put into the map and what I should make the code I'd be REALLY thankful.

old Re: Scripting Questions

Amritsar
User Off Offline

Quote
I do know basic scripting =-) Just I have no idea what your referencing...

I usually learn by example and most of that tutorial is dealing with the editor.

I know how to make edible objects and units and all that but I don't know the type commands.

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
Gast has written
Yes, exactly. I know nothing of scripting and don't really care to learn so if someone could tell me exactly what trigger to put into the map and what I should make the code I'd be REALLY thankful.


with this opinion you wont get far. By the way, I already told you how to do it.

old Re: Scripting Questions

Guest

Quote
Flying Lizard has written
Gast has written
Yes, exactly. I know nothing of scripting and don't really care to learn so if someone could tell me exactly what trigger to put into the map and what I should make the code I'd be REALLY thankful.


with this opinion you wont get far. By the way, I already told you how to do it.

Yep, I deserved that one. So I figured out how to change the map I'm going to experiment with the variables in a minute.

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
Xane, better create an account and I will help you after
I know that begainings from myself
To the start Previous 1 222 23 24121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview