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 245 46 47121 122 Nächste Zum Anfang

alt Re: Scripting Questions

Vince87
User Off Offline

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

alt Re: Scripting Questions

darksol
User Off Offline

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

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
ESKARN hat geschrieben
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.
1× editiert, zuletzt 15.09.08 06:51:09

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
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

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
DontKnowToScript hat geschrieben
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.

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
DontKnowToScript hat geschrieben
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?
2× editiert, zuletzt 16.09.08 00:21:19

alt Re: Scripting Questions

HudaJan
Super User Off Offline

Zitieren
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

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
HudaJan hat geschrieben
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.
1× editiert, zuletzt 16.09.08 06:07:52

alt Amiga 500

Gast

Zitieren
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

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
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?

alt Re: Scripting Questions

garfield751
User Off Offline

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

alt Re: Scripting Questions

jockmo42
User Off Offline

Zitieren
garfield751 hat geschrieben
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.

alt Re: Scripting Questions

HudaJan
Super User Off Offline

Zitieren
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...
Zum Anfang Vorherige 1 245 46 47121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht