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 2106 107 108121 122 Next To the start

old Animation Script

Smurf
User Off Offline

Quote
Is thier a script to play an animation,say to keep it simple,I have a Treasure chest and "on_use" I want it to play "animation" of chest opening.

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
objekts cant have animations in stranded, only units can.
so the solution to your problem would be to make an animation for the treasure in a modelling programm and then define it as a unit.
though I cant tell you how to that because I dont know it myself because I havent worked with units yet.
but I hope it helps you to know that you have to make it a unit to make it work

old Animation of Model Type Unit,Item,Object

Smurf
User Off Offline

Quote
Ok I have Looked through Blitz Basic and found these commands which I suspect ,If used with the right "commands",They should animate any model with animations.These are the commands,as they say in Blitz Basic

LoadAnimSeq ( entity,filename$ )
SetAnimKey entity,frame[,pos_key][,rot_key][,scale_key]
AddAnimSeq ( entity,length)
Animate entity,[,mode][,speed#][,sequence][,transition#]
AnimLength ( entity )
AnimTime# ( entity )
Animating ( entity )

Now the question is how to use them.

old Re: Scripting Questions

Jason13579
User Off Offline

Quote
You can use s2 cmd ai_stay or s2 cmd freeze.

If you use ai_stay the unit stops going around but it's still animated. When you use freeze the unit won't do anything, no animation and no movements anymore.

ai_stay unit-ID,mode
freeze unit-ID,mode

mode=1: moving
mode=0: stop moving/"freezed"

Sorry for my bad English, I used Google translater

old Re: Scripting Questions

MrShock
User Off Offline

Quote
But i mean script no ai_stay etc. The script sounds like this :

1
2
3
4
{
object
    stay_self
}

Its look like this what i say dont remember ?? if yes pls say there PLS ! i need it
edited 3×, last 21.09.10 02:03:12 pm

old Re: Scripting Questions

Smurf
User Off Offline

Quote
How do I assign a "Trigger" to an "object" and set "Radius" to the "object" to set off the "Trigger"?. Not in the Map editor,using Info trigger,I mean in the script of the "object".

So then I can use the on:trigger { command.

old Re: Scripting Questions

Lion_Hearted
User Off Offline

Quote
Is there a command to order a model to load a new skin, not a new model?

Meaning...

I have a log pile... it looks dry on sunny days... however on rainy days, I want it to load a diffrent texture and make it look wet...


I don't really want to make another model, I just want to make the current model use another texture on a certain command...


Also, if I use this for lets say... a lion, so that when it dies, it loads a texture that appears bloody and full of cuts and wounds, (dead lion, with apparent wounds)



Is there a command that loads a different texture, not a different model...

old Re: Scripting Questions

Lion_Hearted
User Off Offline

Quote
Thank you!

It worked beautifully!


Now I got a bloody lion when I kill it!

I'm currently working on graphics to upload, and a script unit file to upload to accompany the graphics... to make kills look a little more realistic then the animal just dropping to the ground...

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
all the things you have in Stranded II can be sorted by classes:
• objects
• items
• units
• infos

so these are different categories and e.g. there can be an object with the type-number 1, an item with the type-number 1, a unit with the type-number 1 and an info with the type-number 1!
type-numbers are the numbers you see when holding your mouse over the icon in the editor.
but type-numbers are different from IDs. IDs start from number 1 and then go up but an ID is not bound to a type-number, e.g. the item with ID 1 can be an item of the item-type 4, ID 2 can be type 26, it can be any type that exists, the IDs that stand for a certain type depend on the orde rby which you place stuff, e.g. at first you place a stone so the item with ID 1 will have the type-number of the stone, then you place a bag so the item with ID 2 will have the type-number of the bag.
also, IDs restart for all 4 classes so there can be an object with the same ID as an item or a unit or an info.

hope I was able to help you

old Re: Scripting Questions

Lion_Hearted
User Off Offline

Quote
So, what your saying is, Units, objects, items, and infos, all have their own unique code IN the game, and OUT of the game...


I understand that. as objects and items and units all start at 1, and end at n/a.


However, what does the property "group" mean?

Cause, open up any of the inf's that has either objects, items, or even units in them, and there will be a property saying, (for edible items) "group=food"


What does that property mean...

I've removed it, and it didn't seem to make a difference... I've used it, and it didn't make a difference... at least, none that I could see...

What does the property group do...

old Re: Scripting Questions

DannyDeth
User Off Offline

Quote
Lion_Hearted has written
Ah, so groups is essentially classes in an editor?

For each group, the editor starts at 1 ID?

Yes, that is why you can have 255 objects, 255 units, 255 items, etc.

EDIT: @Smurf:

I don;t think that is possible, you have to define it individually to the info trigger, so the only way i KNOW to do it, is to do it in the editor.

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
@Lion_Hearted:
yes, the groups.inf file is just for sorting stuff in the editor, e.g. you can go to the items (or all other groups) and click on the word "All" above the icon of the items. this will open a list with all groups so you can click on one of the groups and then you see only the items that belong to that group (e.g. "tools").
furthermore all objects (by "objects" often all 4 classes are meant, not just the class "objects"!) can be sorted by multiple groups so an item that is in the group "tools" can also be found in the group "weapons".

@DannyDeth:
well, there can be way more than 255 objects, 255 units, 255 items and 255 infos.
in fact, you can define the number in the game.inf file yourself by these lines:
1
2
3
limit_objects=750
limit_units=50
limit_items=200
(these numbers are just an example.)
the Extension Mod, for instance has these numbers set as limits:
1
2
3
limit_objects=4000
limit_units=250
limit_items=4000
and actually has more than 500 items and more than 800 objects in it.

old Re: Scripting Questions

UnIdEnTiFiEd
User Off Offline

Quote
what's a script so if an animal has the raptor behaviour when it's health is low it will run away? i saw something like this is S2EXT but the scripts are german
To the start Previous 1 2106 107 108121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview