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 277 78 79121 122 Nächste Zum Anfang

alt Re: Scripting Questions

Vibhor
User Off Offline

Zitieren
JadeStone hat geschrieben
i need on impact to check if the enemy is dead or not i want it to do somthing if its dead.


Event will be best option
on:kill
msg shutdafukup
or something like that
dont forget to put brackets and stuff

alt Re: Scripting Questions

bezmolvie
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
on:impact{
	$tmp1=impact_class;
	$tmp2=impact_id;
	if (lives ("$tmp1", $tmp2)==0){
		//What you want to happen
	}
	freevar $tmp1,$tmp2;
}

This should work, but I'm not sure as I haven't been scripting in so long...

alt Re: Scripting Questions

Vibhor
User Off Offline

Zitieren
JadeStone hat geschrieben
If the enemy is dead when you hit him it does somthing but if its alive it doesnt.


Its fun
it would go like this
on:kill
set $var to 1
and after that
on:hit
if $var==1
then do something

alt Re: Scripting Questions

bezmolvie
User Off Offline

Zitieren
I thought you were using this script for a projectile. If it is for the lion than Schnapsidee's script will work.

alt Re: Scripting Questions

Vibhor
User Off Offline

Zitieren
JadeStone hat geschrieben
still doesnt work

its for a weapon


Did you try my hot stuff?
it should work

alt Re: Scripting Questions

dragoana
User Off Offline

Zitieren
if you wrote it in a shooting weapon's script it won't work
either you use Bloodshot's script for the projectile or mine or Vibhor's script for the enemy.

alt Re: Scripting Questions

Phyire
User Off Offline

Zitieren
What does this below mean? I keep getting this on an odd occation in random maps.

---------------------------
Error!
---------------------------
Memory access violation
---------------------------
OK
---------------------------

alt Re: Scripting Questions

ohaz
User Off Offline

Zitieren
a memory access violation occurs when the game trys to read or write on a part of your RAM when it's not allowed to do so, or when the location where it wants to read is empty.
You can't to anything to solve this problem, just save often and hope that it doesn't occure

alt Re: Scripting Questions

Lar5
User Off Offline

Zitieren
Hi! I'm trying to make a good Stranded 2 map, but i dont know how to make the npcs sell things...
How do i do it? Is it? Unit(hempguy)-scripts:

on:use {
page=start
title=Grandpa
text=start
Hey you. How's it going?
text=end
button=trade,I want to trade.
button=action:close,Don't bother me!

page=trade
title=Trade with grandpa
### Hempleaf -> Cookie
trade=start
sell=83,5
buy=66,1
trade=end
### Hempleaf -> Trunk
trade=start
sell=83,10
buy=7,1
trade=end
### Hempleaf -> Grapes
trade=start
sell=83,15
buy=45,3
trade=end
### Hempleaf -> Grain Pile
trade=start
sell=83,15
buy=42,3
trade=end
### Hempleaf -> Plums
trade=start
sell=83,15
buy=116,3
trade=end
### Hempleaf -> Coconut
trade=start
sell=83,20
buy=27,3
trade=end
### Hempleaf -> Banana
trade=start
sell=83,20
buy=14,3
trade=end
### Hempleaf -> Cacao Fruit
trade=start
sell=83,25
buy=67,3
trade=end
### Hempleaf -> Coffee Fruits
trade=start
sell=83,25
buy=70,3
trade=end
button=action:close,Cheers!
}

alt Re: Scripting Questions

Vibhor
User Off Offline

Zitieren
Phyire hat geschrieben
Is there NO way i can find out where this Memmory access violation originates from?

Nope
just avoid areas which takes higher memory and CPU speed
Zum Anfang Vorherige 1 277 78 79121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht