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 276 77 78121 122 Next To the start

old Re: Scripting Questions

JadeStone
User Off Offline

Quote
why isent this working?

     on:keydown42 {
          addstate "unit",1,9;
     }

     on:keyrelease42 {
          freestate "unit",1,9;
     }

its in game.inf i want to add running so i did this and its just not adding it.

im also trying to make a complicated weapon and i dont know how to convert it from text to code:

Portal Gun:
on impact using mouse 1 create point 2
on impact using mouse 2 create point 2
on touch sea XYZ of player create explosion

Point 1
if player used point 2 in last 2 seconds then on touch doesnt activate
point 1 active if point 2 exists
If point 1 active then
on touch point 1 then
Point 1 Remove
player XYZ = XYZ of Point 2
on create add state particle

Point 2
if player used point 1 in last 2 seconds then on touch doesnt activate
point 2 active if point 1 exists
If point 2 active then
on touch point 1 then
Point 2 Remove
player XYZ = XYZ of Point 1
on create add state particle
edited 2×, last 02.11.09 07:09:47 am

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
It is not working because you key ID is 42, it is higher then 20
EDIT: and i think you must change keydown with keypress.
You made laggy thing. State is adding all time you pressing the button! but if key_press, it will be added one time.
edited 1×, last 02.11.09 09:57:42 am

old Re: Scripting Questions

Vibhor
User Off Offline

Quote
Vectar666 has written
It is not working because you key ID is 42, it is higher then 20
EDIT: and i think you must change keydown with keypress.
You made laggy thing. State is adding all time you pressing the button! but if key_press, it will be added one time.


Keydown is a command
you can also do it key hit?

old Re: Scripting Questions

Vibhor
User Off Offline

Quote
Vectar666 has written
it is not a command, it is an event.

What definition FX does?


Thanks for that word(really)
i was looking for a word to define the on: stuff

old multi-Options

Phyire
User Off Offline

Quote
How can I give som1 the option to do more then one thing with an item: for example
if I use a branch near a fire, i can choose to burn it completly or make a torch with it.

help would be appritiated, I've been stuck with this for a while.

old Re: Scripting Questions

Phyire
User Off Offline

Quote
omw i was stupid, thnx Vecter666, i kept trying to script it in the branch!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
page=start
title=Fireplace
text=start
I can make a torch with a branch if i burn the edge OR I can burn it completly to get charcoal.
text=end
button=trade,Burn or Torch
button=action:close,Later

page=trade
title=Torch
###Branch -> Torch
trade=start
sell=24,1
buy=111,1
trade=end
###Branch -> charcoal
trade=start
sell=24,1
buy=299,4
trade=end
button=action:close,Later... I change my mine.

si this right? When i press the use button on the fireplace nothing happens.

The file i modified is sys\scripts\fireplace.s2s

I set the ID limit to 999 so dont worry about
1
buy=299,4

NVM i got it to work, ignore all i typed above
edited 3×, last 02.11.09 06:51:06 pm

old Re: Scripting Questions

JadeStone
User Off Offline

Quote
Whats wrong with this it works but when i alter the item the old one stays.

     on:attack2 {
     $attack2script=getamount 140;
     msg "Burn Mode";
     alteritem $attack2script,140,$attack2script,141;
     equip 141;
     }

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
1. Dont make loooong variables.
2.Commands after "=" must have "()"
1
2
3
4
5
6
on:attack2 {
$ats=getamount(140);
msg "Burn Mode";
alteritem $ats,140,$ats,141; 
equip 141;
}

old Re: Scripting Questions

Phyire
User Off Offline

Quote
Does any1 know how i can add more map sizes? Like: small(32x32), medium(128x128), big(256x256), (and then new ones) huge(512x512), gigantic(1024x1024), real(2048x2048), continent(50000x50000)?

LOL, not realy continent

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
It is impossible without editing the source code.
But you can make infinite territory: Press button "raise terrain border" about 6 times in editor

old Re: Scripting Questions

Vibhor
User Off Offline

Quote
the huge map is actually too big to travel
but i never got to infinite territory
oh and does anybody know how to mark stuff on map in-game?

old Re: Scripting Questions

Vibhor
User Off Offline

Quote
Vectar666 has written
Mark? What do you mean?

Mark in the map
like used a map but it doesnt have a mark of what i want
I want to create X at a location i want
IN-GAME
no opanin the editah

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
Info "Map Indicator".
1
2
$id=create("info",36,x,z);
starttrigger $id;
edited 1×, last 03.11.09 07:44:05 pm
To the start Previous 1 276 77 78121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview