Forum

> > Stranded II > Scripts > How do know if you are NOT riding a unit
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch How do know if you are NOT riding a unit

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt How do know if you are NOT riding a unit

Corvallis5
User Off Offline

Zitieren
I want to make it so that when you are riding a wagon your maxhealth goes up, I know how to do that:
1
2
3
4
on:use {
ride;
maxhealth "unit",1,110;
}

but how do I make it so that it goes back down when you get off the wagon?

alt Re: How do know if you are NOT riding a unit

Hurri04
Super User Off Offline

Zitieren
I'm not sure which one you want since you ask for different things in the title and the post but here you go anyway:

if you want to know if you're riding a unit, use
1
$bla=riding();
this will return the ID of the unit you're currently riding, if you are riding a unit. otherwise it returns 0.

if you want to get off a unit if you are riding one, use
1
getoff;
also, since you can also get off with the 'use' key again, you would need to check when you get off. here you have to use an event:
1
2
3
on:getoff {
	...
}
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht