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 225 26 27121 122 Nächste Zum Anfang

alt Re: Scripting Questions

lint35
User Off Offline

Zitieren
Is it possible to make an item for when you die you can use it then it brings you back to life? Or when you die you are automaticly braught back to life from that item? If so could you tell me the script?

alt Re: Scripting Questions

Maenardil
User Off Offline

Zitieren
GreyMario hat geschrieben
You're sure it's not a batch file? Try dragging it into Notepad, you'll see the inner workings of it if it's a batch file.


I'm sure. It's S2Ext.exe file.


lint35 hat geschrieben
Is it possible to make an item for when you die you can use it then it brings you back to life? Or when you die you are automaticly braught back to life from that item? If so could you tell me the script?



Yes, it's possible. Just take a look how Ankh work in Ext2 Mod.

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
Huda, you're too fast for me to realize I'm not logged in.

Anyway, here's the post I was typing up as a guest:
Zitat
This be a quick whip-up and not the best way to do it, but try the following in the map's global script:

1
2
3
if(lives("unit",1") && getamount([ID])){
    revive 1;
}

This has a small chance of not working, but try it anyway.


If you could perhaps hook this check to always be active and not use up a bunch of computer resources, you could use the above code there.


Maenardil: Sounds like one of two possibilities: either a batch file was compiled to .exe, or it was written by someone with a way of doing so.

alt Re: Scripting Questions

MrCowThing
User Off Offline

Zitieren
I'm trying to make the revival script, but it's not working, heres what I have

1
2
3
4
5
6
7
8
9
$lives=4;
	if (exsist 1 == 0 && $lives>0){
		revive 1;
		msg "revived! $lives lives left!";
		$lives=$lives-1;
	}
	if ($lives<=0){
		kill 1;
	}

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
MrCowThing hat geschrieben
I'm trying to make the revival script, but it's not working, heres what I have

1
2
3
4
5
6
7
8
$lives=4;
if (exist 1 == 0 && $lives>0){
		revive 1;
		msg "revived! $lives lives left!";
		$lives=$lives-1;
} if ($lives<=0){
		kill 1;
}


typo fixed (exsist -> exist) also minor formatting woo

alt Re: Scripting Questions

MrCowThing
User Off Offline

Zitieren
Ok thanks. Here's what I got now, but it's still not working. When I spawn it does say "Press attack to revive" but when I die it doesn't do anything.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$lives=4;
	on:start{
		if (exist 1 < 1 && $lives>0){
			$lives=$lives-1;
			msg "Press attack to revive";
		} if ($lives <= 0){
			kill 1;
		}
	}

	on:attack1{
		if (exist 1 < 1 && $lives>0){
			revive 1;
			msg "Revived! $lives lives left";
		} if ($lives <= 0){
			kill 1;
			msg "You have no more lives!";
		}
	}

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$lives=4;
	on:start{
		if (exist(1) < 1 && $lives>0){
			$lives=$lives-1;
			msg "Press attack to revive";
		} if ($lives <= 0){
			kill 1;
		}
	}

	on:attack1{
		if (exist(1) < 1 && $lives>0){
			revive 1;
			msg "Revived! $lives lives left";
		} if ($lives <= 0){
			kill 1;
			msg "You have no more lives!";
		}
	}

Try that on for size.

alt Re: Scripting Questions

Mc Leaf
Super User Off Offline

Zitieren
You have to put it in the right function I think... (should be somewhere in the game.inf or unit.inf)

Or maybe you'll have to exchange "on:attack1" with "on:kill". Put the hole stuff in the "units.inf" (unit 1 - player) that should solve it.

Or try this... (unit 1 in units.inf)
1
2
3
4
5
6
7
8
9
10
11
12
13
on:start{
	     $lives=4;
}

on:kill {
	if ($lives>0) {
		$lives--;
		revive 1;
		msg "Revived! $lives lives left!",4; 
	} else {
		msg "No more lives left!",3;
	}
}
(can't test it yet)

By the way it seems to be nonsense to let the player press the "attack"-Button. Of course he want to be revived...!
Apart from this fact I actually don't know, if pressing a button does anything if you've been killed. So just let him revived and enough.
3× editiert, zuletzt 21.05.08 05:31:32

alt Re: Scripting Questions

Gast

Zitieren
Hey, as long as I see McLeaf here, am I allowed to use some models from EXT mod for my map? I'm not pretending to make a mod in general, I just want 1 map where I'll put a storyline later (after I finish my uni session).
I will put a readm file with all the credits, and if you allow can you let me know who's the creator of your models?

alt Re: Scripting Questions

Maenardil
User Off Offline

Zitieren
Deon hat geschrieben
am I allowed to use some models from EXT mod for my map? [...]
I will put a readm file with all the credits, and if you allow can you let me know who's the creator of your models?


I have the same question. Can I use Ext Mod textures/models in my mod? And by "my" I mean mod that can be released in public.

And one more question. Can I override "ride" script? Basically, I want an object appear as "mounted" or in other words player would control movement of this object, but controls and behavior would be different from what we have now when riding a vehicle.

alt Re: Scripting Questions

Mc Leaf
Super User Off Offline

Zitieren
Deon hat geschrieben
Hey, as long as I see McLeaf here, am I allowed to use some models from EXT mod for my map? I'm not pretending to make a mod in general, I just want 1 map where I'll put a storyline later (after I finish my uni session).
I will put a readm file with all the credits, and if you allow can you let me know who's the creator of your models?

The creator of the mod is bizzl. But there a some developers (bizzl, banane, me...) creating some models and other stuff.
Some models are made by me, so (maybe) you could use them. But better ask bizzl or banane to get a permission for using the stuff...

alt Re: Scripting Questions

Gregg
User Off Offline

Zitieren
OK, so this quiestion is the noob-iest ever, but bear with me. If I wanted this to appear as a diary entry what would the script be (it's inside an ariel trigger).

Omnious (title)

I have just found an array of weaponary, that seems to be from the pirate age... etc.

Anyt help please :p

-Gregg

P.S. It's for a map I'm realeasing (it will be rubbish so don't get your hopes up :P) and I can't really script (Yet I'm making a mod, see the irony? *ignore this*

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
1
2
3
4
5
6
7
on:trigger{
	add "!1This text will be yellow and bold.";
	add "";
	add "The above blank line is simply a newline. The quick brown fox jumps over the lazy dog. The previous reveals that lines automatically wrap.";
	diary "This is the title of the diary entry.";
	stoptrigger self;
}

EDIT: forgot the end code tag

alt Re: Scripting Questions

TheS0rr0w
COMMUNITY BANNED Off Offline

Zitieren
TheKilledDeath hat geschrieben
but how to ask bizzl if he deletes his webspace, deletes his profile, and so on?


maybe he was hacked or something like that

alt Re: Scripting Questions

DC
Admin Off Offline

Zitieren
off topic:
@silentstorm: no I don't think so. he mailed me that I does not want to be wiki admin anymore. I don't think that this and the deleted profile data is a coincidence.

alt Sprechen

Gast

Zitieren
Wie kann man bei stranded eigentlich wenn man im editor was baut, einstellen wie man mit anderen redet



Bitte antwortet schnell!

alt Re: Scripting Questions

TheS0rr0w
COMMUNITY BANNED Off Offline

Zitieren
[GER]schreib im englischen forum ausschließlich englisch , idiot[/ger]
[eng]
please write english in the eglish forum,idiot[/eng]
Zum Anfang Vorherige 1 225 26 27121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht