Forum

> > Stranded II > Scripts > How to make a "certain toxic area"?
Forums overviewStranded II overview Scripts overviewLog in to reply

English How to make a "certain toxic area"?

8 replies
To the start Previous 1 Next To the start

old How to make a "certain toxic area"?

-RZ-
User Off Offline

Quote
Hey, I'm just trying to make a certain object (a radioactive barrel... Yes, I'm making a mod) to glow in green. I want it to looks like some kind of radioactive effect...

IMG:https://i.imgur.com/drImnEs.png


actually I'm trying to use "addstate" and "shine" commands, but how to make glow in green color? Someone have a idea?

EDIT: Ok, it worked

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
### Radioactive Barrel
id=225
name=Radioactive Barrel
group=stuff
icon=gfx\r_barrel.bmp
model=gfx\r_barrel.b3d
health=50
mat=metal
var=radius,Radius,100,0
var=damage,Damage,25,0
script=start
	on:load {
		addstate "self",22;
		statesize "self",22,50;
		statecolor "self",22,0,255,0;
	}

	on:create {
		addstate "self",22;
		statesize "self",22,50;
		statecolor "self",22,0,255,0;
	}
	on:kill {
		explosion getx("self"),gety("self"),getz("self"),$radius,$damage;
		addstate "unit",1,"intoxication";
		statevalue "unit",1,"intoxication",0;
	}
script=end

IMG:https://i.imgur.com/9baVRLh.png


Now I have a diferent question... When the barrel explodes, I want then to make it intoxicate a certain area... How can I make this?
edited 1×, last 02.07.15 07:05:49 pm

old Re: How to make a "certain toxic area"?

pupp3tStudios
User Off Offline

Quote
Well... there isn't really a way to do an affected area with scripts, I think. But you can emulate this with the area-based trigger!

You need to use the stoptrigger and the startrigger commands for the areal trigger.

Have it so that when the barrel is destroyed, the trigger activates.
The script when you walk in should be:
on:trigger{
addstate "unit",1,2;
}

old Re: How to make a "certain toxic area"?

-RZ-
User Off Offline

Quote
Oh sorry but how can I use starttrigger? Because It doesnt uses a specific target?

IMG:https://i.imgur.com/HOfv4Uv.png


Can I adjust the effect area?
edited 1×, last 03.07.15 04:37:38 am

old Re: How to make a "certain toxic area"?

pupp3tStudios
User Off Offline

Quote
Here's a quick run-down. A tutorial, if you will.
1. Have the map's global script read

on:start {
stoptrigger [the ID of the areal trigger]
}

2. Set up the areal trigger's script:
on:trigger {
addstate "unit",1,2. (2 meaning poisoning.)
}
-Adjust the radius of the trigger during this time. ALSO!
DON'T select the box labeled "Always Active". This will defeat the purpose of your desired scenario.

3. Script the barrel (or barrels) as follows:
on:kill {
starttrigger [the ID of the areal trigger]
}
If it's one barrel, apply this script. If it's multiple barrels, copy and paste the script.

This should help.
Nice texture for your menus.

old Re: How to make a "certain toxic area"?

-RZ-
User Off Offline

Quote
OOOOH so many thanks! It worked. As I expected. Thank you guy. And yeah I made some changes (or a lot) on the interface. To looks like more a "radioactive post-apocallypse disaster island". I'm modeling some new creatures (like... uh... "radioactive infected animals" and stuff like that) and I will use closetrigger behaviour for the M18 Claymore AP mine and I am working alone soo I apreciate the help! Seriously. Thank you so much.

IMG:https://i.imgur.com/t0NXehw.png


actually I made some little changes but I need to export all the models to .b3d and this is a pain in ass, because the new blender version exports .fbx (i'm using fbx because it suports animation as well... and I can import the animation in milkshape3d) in their 7.4v and Milkshape only supports (my version I think) 6.1v ;-;

IMG:https://i.imgur.com/I5IBBMj.jpg

old Re: How to make a "certain toxic area"?

pupp3tStudios
User Off Offline

Quote
You're welcome!
My mod was an action-based mod, Zer0 Hour, so I had to think outside the box on making these scripts.
The fact that you're doing a mod for Stranded II kind of inspires me to continue working on my old action-based mod.

old Re: How to make a "certain toxic area"?

-RZ-
User Off Offline

Quote
Thats really good S2 is a wonderful game with LOTS of possibilities and we can make barely everything in the game. So I will spend some days or weeks in the process of making my mod. Thank you and good luck with your mod.

old Re: How to make a "certain toxic area"?

Seekay
Reviewer Off Offline

Quote
Got nothing to do with the script, but I believe you mispelled "Stranded 2" in your mod's title image. The 'n' is missing. Unless you did that on purpose for some reason.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview