@DontKnowHowToScript Oh dang, that's what you get for writing at like 7 in the morning
Forum
Stranded II Scripts Scripting Questions@DontKnowHowToScript Oh dang, that's what you get for writing at like 7 in the morning
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
// Main event on:newfirestarted { 	loop ("items") { 		$id=loop_id(); 		$typ=type("items",$id); 		if ((($typ==MeatId1)+($typ==MeatId2)+(...))>0) 	{ 			event "checkfry","items",$id;	 		} 		 	} }
Then, in your meat code, add the related event :
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
on:checkfry { 	if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0) { 		if($fry==0) { 			timer "self",15500,1,"fry"; 			play "fry.mp3"; 			$fry=1; 		} 	} }
Yeah, purely speculative, untested code - you gotta love it.
Then you add the global event to every action that starts a fire, so that if you drop a piece of meat then light the fire on, it will start to fry.
As I said, no idea if it is worth the trouble to anyone - I'm just having some fun coding here.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
### throwing ax id=121 name=throwing ax group=ammo icon=gfx\axe.bmp model=gfx\axe.b3d fx=16 scale=0.2 mat=wood weight=3 behaviour=spear info=throwing ax o what fun damage=12 healthchange=0 script=start 	on:impact { 		if (impact_first()==1){ 				$tmp=create("item",121); 					setpos "item",$tmp,impact_x(),impact_y(),impact_z(); 					setrot "item",$tmp,0,getyaw("unit",1),0; 				} 			} script=end
i was wondering what model format for the map is
edited 1×, last 08.12.08 03:08:59 am
i checked in sys files under mods but i cant find it?
If someone want's to destroy the fun of the game by cheating it's his own fault.
But sometimes the cheatsystem is really helpfull, especially when you're stuck and don't want to search an item for 20 days in a row.
Flying Lizard has written
Look at it like this:
If someone want's to destroy the fun of the game by cheating it's his own fault.
But sometimes the cheatsystem is really helpfull, especially when you're stuck and don't want to search an item for 20 days in a row.
If someone want's to destroy the fun of the game by cheating it's his own fault.
But sometimes the cheatsystem is really helpfull, especially when you're stuck and don't want to search an item for 20 days in a row.
To bad you can,t disable it.
anywho I didn,t want to cheat i was just typing random things into the console
i think of loadmap ... but how? (the variables: $exp,$expneed,$level,$job)
please answer soon.
i cant get done with global game since if i want bosses i :
when i get back i will get back to the 4th job island (or other islands) and i will get back to level 1 and exp 1...
i will get back to job 0...
my exp need will get to 1,starting the game again in level,exp and job to when i started to play...
and how to count if a specific unit exists on the island?
ok got how to save them
now other thing:how to make animating sprite (like the fire,but they are just a pic! how they can animate?) i want to make a blue fire
and how to make a player write something and save in a variable? ( trim ?)
edited 2×, last 05.01.09 11:49:34 am
Typ=30 is the flame
2. inputwin
Sadly there are no english texts in the reference, so you'll have to translate the german ones via babelfish.
and inputwin:it cannot let the player write things. i think the most good command is,let the player write something in a file and load it as a variable in message box.ok?
edited 3×, last 07.01.09 01:56:35 am
Link to some screen shots of stone stucture I built real quickly out of about 50 stones
http://img116.imageshack.us/my.php?image=screen01zm3.jpg
http://img116.imageshack.us/my.php?image=screen02wb6.jpg
http://img386.imageshack.us/my.php?image=screen06rf0.jpg
http://img114.imageshack.us/my.php?image=screen07ik1.jpg
copy this into items_material in sys folder
### Stone
id=4995
name=Stone
behaviour=killthrow
group=stone
icon=gfx\stone03.bmp
model=gfx\stone03.b3d
scale=1.3
mat=stone
health=1000
speed=1.8
drag=1.8
rate=1000
mat=stone
weight=1
info=a heavy stone
healthchange=0
script=start
on:impact{
freevar $tmp;
freevar $tmp2;
if (impact_first()==1){
$tmp=create("object",242);
setpos "object",$tmp,impact_x(),impact_y(),impact_z();
setrot "object",$tmp,0,getyaw("unit",1),0;
}
}
}
script=end
### Large Branch
id=4994
name=Large Branch
behaviour=killthrow
damage=2
speed=13
drag=0
rate=1500
group=material
icon=gfx\branch.bmp
model=gfx\branch.b3d
scale=2.5
mat=wood
weight=500
speed=1.8
drag=1.8
rate=3000
info=A large branch. Used for buildings, tools, and other things too.
script=start
on:impact{
freevar $tmp;
freevar $tmp2;
if (impact_first()==1){
$tmp=create("object",2928);
setpos "object",$tmp,impact_x(),impact_y(),impact_z();
setrot "object",$tmp,0,getyaw("unit",1),0;
}
}
}
script=end
Copy this in sys/objects_trees
### Large branch
id=2928
name=Tree
group=tree
icon=gfx\tree01.bmp
model=gfx\branch.b3d
swayspeed=1
swaypower=2
fx=16
scale=2.5
mat=wood
health=600
find=15,20,3
find=24,40,5
find=26,15,1
find=107,5,1
find=107,150,3,1,28
behaviour=tree
healthchange=300
script=start
on:use {
$sh = health("self");
if($sh>0){
$x=getx("self");
$z=getz("self");
$newId=create("item",4994,$x,$z);
$h = $sh - 100;
health "unit", $newId, $h;
free "self";
// Spawn Trunk
on:kill {
if (spawntimer("self")>=0){
event "iskill_wood","global";
create "item",7,getx("self"),getz("self"),3;
corona getx("self"),getz("self");
}
}
script=end
copy this in objects_stone
### Stone
id=242
name=Stone
behaviour=stone
group=stone
icon=gfx\stone03.bmp
model=gfx\stone03.b3d
scale=1.3
mat=stone
health=1000
autofade=350
find=4989,30,1,1,88
find=4987,15,1,1,30
find=4924,30
find=23,90,2
find=21,90,7
script=start
on:use {
$sh = health("self");
if($sh>0){
$x=getx("self");
$z=getz("self");
$newId=create("item",4995,$x,$z);
$h = $sh - 100;
health "unit", $newId, $h;
free "self";
}
}
script=end
edited 9×, last 07.01.09 07:33:21 am
1.oh sry, you'r right. Then I doubt that there is any way to create a blue flame, at least I can't think of any.
2. hm that's odd, the only reason why DC created inputwin, was for inputing strings
Code:
### throwing ax
id=121
name=throwing ax
group=ammo
icon=gfx\axe.bmp
model=gfx\axe.b3d
fx=16
scale=0.5
mat=wood
weight=3
behaviour=killthrow
info=throwing ax o what fun
damage=12
speed=12
drag=3
rate=2000
healthchange=0
script=start
on:impact {
if (impact_first()==1){
$tmp=create("item",121);
setpos "item",$tmp,impact_x(),impact_y(),impact_z();
setrot "item",$tmp,0,getyaw("unit",1),0;
}
}
}
script=end
edited 1×, last 07.01.09 07:39:04 am
Flying Lizard has written
@Dontknowtoscript
1.oh sry, you'r right. Then I doubt that there is any way to create a blue flame, at least I can't think of any.
1.oh sry, you'r right. Then I doubt that there is any way to create a blue flame, at least I can't think of any.
And what about statecolor ? it should be possible...