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 293 94 95121 122 Nächste Zum Anfang

alt Re: Scripting Questions

lint35
User Off Offline

Zitieren
Okay I got it working but my weapon is sideways, I have been trying different pitches and rolls even changing Y

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
You can change stranded 2 title(title.bmp) to bigger one.
EDIT:
My question: How to use s2 cmd defparam ? Description is in german
EDIT2:
Another question: How to know if some type of object exists?
I don't mean about in-game ID, I mean ID that is in smth_xxx.inf files.
2× editiert, zuletzt 23.03.10 15:36:51

alt Re: Scripting Questions

Psytechnic
User Off Offline

Zitieren
Vectar666 hat geschrieben
EDIT2:
Another question: How to know if some type of object exists?
I don't mean about in-game ID, I mean ID that is in smth_xxx.inf files.


Err... My mod viewer does that... Exactly that... In the buildings page, each row has the building's in inf ID and the Object/Unit ID associated with that building.

I'm Just gonna upload a small fix now. Maybe you could try this version and see if something has changed for you Vectar.

alt Re: Scripting Questions

Psytechnic
User Off Offline

Zitieren
Vectar666 hat geschrieben
But I mean do this with S2 scripts!


So you mean, read through every script and grab any external scripts that it links to and display that?

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
I mean that i want to let S2 script know all about items, objects, units, infos. And it must be with the use of S2 SCRIPTS ONLY. I need this for gmod. Its script must indicate all existing units/objects/items/infos and its icons. And make a menu.
And second script must find first non-existing item and make the new item on its id.
I know the second part of second script: s2 cmd def_override , for example. But how to indicates existing and non-existing ids BY USING SCRIPTS?

alt Re: Scripting Questions

lint35
User Off Offline

Zitieren
How would I be able to set the player speed of the player when he has a weapon on in hand?

Edit: I have another question, how do I make a unit play a sound file when it flees?
1× editiert, zuletzt 24.03.10 03:46:08

alt Re: Scripting Questions

Vibhor
User Off Offline

Zitieren
answer for the first question
use on:inhand commands
though you cannot slow the player or anything

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
Vectar666 hat geschrieben
Vibhor hat geschrieben
it really makes unit go back
but the projectile speed is the same

EDIT:It also increases speed of everything
it even increased my speed

I don't know about projectile.
But I really forgot that you are unit too
Try that:
1
2
3
4
5
6
7
8
on:keyhit|yourkeyID|{
     loop ("units"){
	if(loop_id()>1){
         	 addstate "unit",loop_id(),"speed";
       		 statevalue "unit",loop_id(),"speed",-1;
  		}
	}
}
If not, then this:
1
2
3
4
5
6
7
8
on:keyhit|yourkeyID|{
     loop ("units"){
	if(loop_id()>1){
         	 addstate "unit",loop_id(),7;
       		 statevalue "unit",loop_id(),7,0;
  		}
	}
}
Also try to change this 7 to 6, or speed value(-10 or -1) to 0.

EDIT: Yep, and if you want projectiles, maybe you can change it this loop "units" to "items".

I've just found solution for this thing.(however, nobody need this because this post is 1 month old).
But:
1
2
3
4
5
on:keyhit|yourkeyID|{
     loop ("units"){
         	 addstate "unit",loop_id(),60;
	}
}

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
DontKnowToScript hat geschrieben
How to make something a gun,but to cancel the smoke coming out of it?

You can make arbalest with ultra-fast projectiles. It will shoot almost like a gun, but will not create a smoke

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
oh. i think i remember i tried it before and it didnt hit targets. but ill check it out.
Yes as i though. the projectile goes through the object whithut damaging it.
1× editiert, zuletzt 26.03.10 17:13:36

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
Oh. I had that problem, that is because projectile is TOO fast
It goes through because for big speed and because of 50 fps, it jumps over smth

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
DontKnowToScript hat geschrieben
then suggest speed?

I think 50 or 100 or 200
EDIT: How to use s2 cmd closemenu command? It doesn't close cscr! Maybe id or smth?
EDIT2: It works, but keyrelease00 isn't working. Only keyhit.
EDIT3: Yes! Of course! Keyrelease just doesn't work with cscr, because game is paused!
3× editiert, zuletzt 26.03.10 19:47:09

alt Re: Scripting Questions

The Second
User Off Offline

Zitieren
How can I create an info to there where the arrow hits?
I have tried:
1
2
3
4
5
6
7
8
9
10
on:impact {
  local $x,$z;
  $x=impact_x();
  $z=impact_z();
  $id=create("info",32,$x,$z);
  timer "info",$id,250,1,"new";
  freevar $x;
  freevar $z;
  freevar $id;
}
(This is in the arrow's definition)
But nothing happens when the arrow hits to the ground...
Zum Anfang Vorherige 1 293 94 95121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht