Forum
Stranded II Scripts Scripting Questionspost before: use a spawn control
mrcowthing: try this:
script=start
on:inhand {
$me=currentid();
timer "item",$me,1000,1;
}
on:timer {
$me=currentid();
if (getplayerweapon()!=$me) {skip;}
msg "tick";
timer,"item",$me,1000,1;
}
script=end
It looks like the game ignores them, I.E. I've added a building but I don't see it in buildings meny (it's unlocked) but when I replace the vanilla building (just IDs) it's avaliable for building...
Everything works.
EDIT: While I'm here with the last post in the thread, how do I go about an if-then that checks to see if the player is alive and if so, damage player by 50 and give the player a message? I've got the damage player and message part done, I just need to know exactly how to do the if-then.
EDIT TWO: Okay, found that in the reference. The check is lives "class", ID (Returns whether an object of class class and ID ID is alive. Since only units can exist dead, it is largely identical to the command exists) for those who are interested.
edited 2×, last 18.05.08 08:49:33 am
I'd like to know how to trigger some script on dig.
EDIT: dur, there I go again. I post before looking at the list. on:dig
edited 1×, last 18.05.08 09:30:09 pm
Also, the item with the ID of 123 does not exist because the 123rd non-cumulative item has not come into existence yet.
I can make a new map and there I have a nice light effects, but not on my map (which has just 1 dialogue starting script and nothing more pre-defined). The objects have behaviour "torch" but do not light anything.
2nd question - where to define what o behaviours do? (like "torch", "blade" etc.).
the torch problem can have several reasons:
- the radius of the fire light is too small to light the environment. maybe you have to add an additional light state with a larger radius
- the maximum of visible lights at the same time is limited to 8 or something like that. if you have too many lights some will not be visible.
- the light is inside oder under the model and can't illuminate the environment. use state=X,Y,Z in the definition of the object to define where the light should appear in relation to the position of the model. the normal torch for example has state=0,39,0 to make the effects appear at its top.
- the whole light stuff is not very precise because its based on vertices not on textures. so if there are not enough vertices in the environment around the light it might lead to the problem that the light is barely visible.