Forum

> > Stranded II > Scripts > ID Confusion
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch ID Confusion

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt ID Confusion

Corvallis5
User Off Offline

Zitieren
if I put the following script after an item/object/unit what would happen if there were more than one of what I was talking about. here's and example
1
2
3
on:use {
freestored "unit",2,3,2;
}
and there were 10 raptors on the island, what would happen. or If I put

1
$la=count_stored "unit",2,3;
what would happen if there were 10 raptors.

ps. I know the second script is wrong but you know what I mean

Admin/Mod Kommentar

title changed...

alt Re: ID Confusion

Hurri04
Super User Off Offline

Zitieren
1
freestored "unit",2,3,2;
mediated: "look at the unit with the ID 2 and if there are any items of type 3 stored in it, delete 2 of them".

1
$la=count_stored "unit",2,3;
"look at the unit with the ID 2 and if there are any items of type 3 stored in it, count them and return the number into a variable".

alt Re: ID Confusion

Corvallis5
User Off Offline

Zitieren
user Hurri04 hat geschrieben
1
freestored "unit",2,3,2;
mediated: "look at the unit with the ID 2 and if there are any items of type 3 stored in it, delete 2 of them".

1
$la=count_stored "unit",2,3;
"look at the unit with the ID 2 and if there are any items of type 3 stored in it, count them and return the number into a variable".


no I know what it means/does but say:
you put that script on a map.
unit w/ id 2=raptor
there are 10 raptors on the map
then what would it do

alt Re: ID Confusion

Hurri04
Super User Off Offline

Zitieren
depends, if the unit with ID 2 is a raptor, then the script will check if there are items stored in this one specific raptor (loot or something).

btw, why is the title "random ?tion" ??

alt Re: ID Confusion

Corvallis5
User Off Offline

Zitieren
user Hurri04 hat geschrieben
depends, if the unit with ID 2 is a raptor, then the script will check if there are items stored in this one specific raptor (loot or something).

btw, why is the title "random ?tion" ??


NO, I mean that since the unit w/ id number 2 is raptor and then you put that script in a map and there are 10 raptors in the map. Which raptor will it choose to check?

the title is that cuz it dont let you use the word question

alt Re: ID Confusion

Hurri04
Super User Off Offline

Zitieren
as I said, the raptor with ID 2 will be checked since there can be only one unit with this ID, so it doesnt matter how many raptors you place on the map.

alt Re: ID Confusion

DC
Admin Off Offline

Zitieren
each raptor (and each unit/item/object in general) has a unique ID. it will always check the one with the ID you specify!
do not confuse the type id and the unique id for the instance on the map. those are 2 different ids.

type id: describing the TYPE of a unit/object/item. so several units/items/objects on the map can have the same id

instance id: this id is unique. there can only be one unit, one item and one object with that ID. never two at the same time.
commands like freestored and count_stored use the unique instance id, not the type id, because you have to specify one single unit/object.

also you should choose a real title instead of this crappy question crap which totally makes the title useless. I totally didn't forbid the word "question" in titles for fun...

alt Re: ID Confusion

lucas is stranded
User Off Offline

Zitieren
Example:

Spoiler >


The "101" is not the ID that you find in the "units_" list, it's the ID of the unit placed in the editor, as DC said, each unit placed in the editor will have it's own unique ID.


That ID can be found on the upper right part of the screen when you click on the unit.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht