English Scripting Questions

2,429 replies
Goto Page
To the start Previous 1 2 ... 93 94 95 ... 121 122 Next To the start
17.03.10 10:54:27 pm
Up
lint35
User
Offline Off
Okay I got it working but my weapon is sideways, I have been trying different pitches and rolls even changing Y
IMG:http://bfbc2.statsverse.com/sig/userbar4/360/KI113R%20L3M0NZ.png
18.03.10 08:08:17 pm
Up
Vectarrio
User
Offline Off
Just change $pitch, $yaw.
21.03.10 09:33:17 am
Up
lint35
User
Offline Off
How would I go about adding an image for the menu instead of a sequence? thanks
IMG:http://bfbc2.statsverse.com/sig/userbar4/360/KI113R%20L3M0NZ.png
21.03.10 09:36:12 am
Up
Vectarrio
User
Offline Off
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.
edited 2×, last 23.03.10 03:36:51 pm
23.03.10 09:43:17 pm
Up
Psytechnic
User
Offline Off
Vectar666 has written:
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.
23.03.10 10:29:13 pm
Up
Vectarrio
User
Offline Off
But I mean do this with S2 scripts!
23.03.10 11:01:56 pm
Up
Psytechnic
User
Offline Off
Vectar666 has written:
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?
23.03.10 11:09:33 pm
Up
Vectarrio
User
Offline Off
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?
23.03.10 11:48:07 pm
Up
Psytechnic
User
Offline Off
Well... you've got me stumped there....
24.03.10 01:14:50 am
Up
lint35
User
Offline Off
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?
edited 1×, last 24.03.10 03:46:08 am
IMG:http://bfbc2.statsverse.com/sig/userbar4/360/KI113R%20L3M0NZ.png
24.03.10 04:29:56 am
Up
Vibhor
User
Offline Off
answer for the first question
use on:inhand commands
though you cannot slow the player or anything
My avatar describes my personality the best....Douchebag who have to save the princess without speaking anything
24.03.10 12:29:50 pm
Up
Vectarrio
User
Offline Off
Vectar666 has written:
Vibhor has written:
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:
Code:
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:
Code:
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:
Code:
1
2
3
4
5
on:keyhit|yourkeyID|{
     loop ("units"){
               addstate "unit",loop_id(),60;
     }
}
26.03.10 10:49:37 am
Up
DontKnowToScript
User
Offline Off
How to make something a gun,but to cancel the smoke coming out of it?
IMG:http://i3.photobucket.com/albums/y61/anarchyluvsme/userbar/2513.jpg
IMG:http://needasig.com/3sDx.png
IMG:http://needasig.com/VM5T0.png
IMG:http://needasig.com/H14W3.png
26.03.10 11:53:12 am
Up
Vectarrio
User
Offline Off
DontKnowToScript has written:
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
26.03.10 04:16:00 pm
Up
DontKnowToScript
User
Offline Off
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.
edited 1×, last 26.03.10 05:13:36 pm
IMG:http://i3.photobucket.com/albums/y61/anarchyluvsme/userbar/2513.jpg
IMG:http://needasig.com/3sDx.png
IMG:http://needasig.com/VM5T0.png
IMG:http://needasig.com/H14W3.png
26.03.10 05:30:24 pm
Up
Vectarrio
User
Offline Off
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
26.03.10 05:32:16 pm
Up
DontKnowToScript
User
Offline Off
then suggest speed?
IMG:http://i3.photobucket.com/albums/y61/anarchyluvsme/userbar/2513.jpg
IMG:http://needasig.com/3sDx.png
IMG:http://needasig.com/VM5T0.png
IMG:http://needasig.com/H14W3.png
26.03.10 05:34:07 pm
Up
Vectarrio
User
Offline Off
DontKnowToScript has written:
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!
edited 3×, last 26.03.10 07:47:09 pm
27.03.10 09:00:58 am
Up
DontKnowToScript
User
Offline Off
Vectar666 has written:
I think 50 or 100 or 200

Thanks!
IMG:http://i3.photobucket.com/albums/y61/anarchyluvsme/userbar/2513.jpg
IMG:http://needasig.com/3sDx.png
IMG:http://needasig.com/VM5T0.png
IMG:http://needasig.com/H14W3.png
27.03.10 03:04:16 pm
Up
The Second
User
Offline Off
How can I create an info to there where the arrow hits?
I have tried:
Code:
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...
To the start Previous 1 2 ... 93 94 95 ... 121 122 Next To the start