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 245 46 47121 122 Next To the start

old Re: Scripting Questions

Vince87
User Off Offline

Quote
is there a way to keep timers on items going even if they got picked up?

here is my test-script:

script=start
on:create {
$nugget=currentid();
timer "item",$nugget,5000,1;
     msg "Das klappt zumindest!",6;
}
on:timer{
     local $new,$amount,$currentid;
     $currentid=currentid();
     $amount=getamount($currentid);
     $new=create("item",3);
     setat "item",$new,"item",currentid();
     setamount $new,$amount;
     free "self";
}
script=end

when I pick it up there is no error message.only nothing changes. I want to keep the timer going from the point of creation. even change the item if its stored.

old Re: Scripting Questions

darksol
User Off Offline

Quote
is there a way to flatten the ground? I want it so that win you right click the ground gets flatten so it makes it better to plant things.

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
ESKARN has written
is there anyway to stop people from using cheats on my maps


Not really. If they want to ruin all the fun, there's nothing the mapper can do about it, but you have to remember that cheating is beneficial to those who would not be able to progress otherwise. A bug in the program may cause the loss of a crucial item or the misplacement of something important. With the console, the player still has a chance to progress.

I won't say cheating is smart, but I will say that it can get you out of impossible situations sometimes.

Sorry for the lecture.

Who would know where to start with a random event script? I'd want it run on random islands and every day have a one in twenty-four chance to create a crate or barrel with an item chosen randomly from a list near the shore. I want it to deactivate once there are three crates/barrels created, and start again when one of them is destroyed.

Ugh, that's a lot of random.
edited 1×, last 15.09.08 06:51:09 am

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
maybe write the script on a text container and use the coomand addscript to the create variable.see how its dont with the pirate on 1st island.
oh,and,if u want the stop spawning put a spawn control info and set the number max to 3

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
DontKnowToScript has written
maybe write the script on a text container and use the coomand addscript to the create variable.see how its dont with the pirate on 1st island.
oh,and,if u want the stop spawning put a spawn control info and set the number max to 3


Don't infos have to be placed in the editor, though? What I want is something I can add to the random island configs that does what I've described automatically.

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
DontKnowToScript has written
i thought you went to CREATE an island


Haha, no. I want something I can add to the random island.

EDIT: Oh, that's handy. I looked at the random events, and stranded already does this.

Ah, here's one. How could I edit rain to be created over the player as well as in front of him, so it wouldn't look so fake if he looked up?
edited 2×, last 16.09.08 12:21:19 am

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
Hmm.. It is possible, but pretty hard, sorry but you should give it up. For now
Anyway I can tell you scripts
s2 cmd getx
s2 cmd getz
s2 cmd timer
s2 cmd particle
(s2 cmd if , s2 cmd getweather)

But I'm affraid it doesn't help sorry
Well, you can't do bad if you examine those scripts for later use

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
HudaJan has written
Hmm.. It is possible, but pretty hard, sorry but you should give it up. For now
Anyway I can tell you scripts
s2 cmd getx
s2 cmd getz
s2 cmd timer
s2 cmd particle
(s2 cmd if , s2 cmd getweather)

But I'm affraid it doesn't help sorry
Well, you can't do bad if you examine those scripts for later use


Alright, another time then. Right now I've got the hammer rigged to break with a 1/200 chance every time it strikes something, but I'd also like to make this happen with a lower probability every time the player uses it on a building site. Here's the impact script.

script=start
     on:impact {
          $tmp=random(1,200);
          if ($tmp==2){
               free current_class(),current_id(),1;
                    speech "negative";
                    msg "My hammer broke!",3;
          freevar $tmp;
                    }else{
}
script=end

How could I apply this when the player uses a building site?

I can't simply hook it to attack2, because that would give the hammer a chance to break when the player accesses the building menu.
edited 1×, last 16.09.08 06:07:52 am

old Amiga 500

Guest

Quote
Hello my name is Kumera how would a script go ,to make a Cannon act as a rifle,but but "on:use say Ride to stand behind it and be able to turn it and shoot a cannonball? like when you throw a banana.

And how can I attach a item to an object say a Cannon to a SHip or that Pirate guy to a SHip so he doesnt fall into the water when it sails?.

For some reason I recall someone made a Turret for a mod but cant remember.

Oh yeah i can make b3d models if anyone wants anything

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
ok,jimi.for your question for the cannon download kidnap mod.search for the turret and just change it.
another thing:could you make a soup model?

old Re: Scripting Questions

garfield751
User Off Offline

Quote
ive been trying to get the yaut to move foward off the map by it self but my script dosent seem to work can you guys take a look at it?

1
2
3
on:start {
	ai_mode move "self";
}

old Re: Scripting Questions

jockmo42
User Off Offline

Quote
garfield751 has written
ive been trying to get the yaut to move foward off the map by it self but my script dosent seem to work can you guys take a look at it?

1
2
3
on:start {
	ai_mode move "self";
}


Well, I don't know anything about this, but it would seem that if you told something to move, you'd need to tell it the direction that it should move in.

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
First of, move should be like this "move".
But it is possible that evet it won't work, cause ai scripts often doesn't work very well...
To the start Previous 1 245 46 47121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview