Mission Script Tutorials?
Moderators: Master_Kale, TNM Team
- SimonDenton
- NSF
- Posts: 78
- Joined: Sun Mar 08, 2009 8:32 am
Mission Script Tutorials?
Any links to useful mission script tutorials? For things like when a flag is set a specific object or person who is in a different map?
- Hassat Hunter
- Illuminati
- Posts: 2182
- Joined: Fri Apr 10, 2009 1:20 pm
Re: Mission Script Tutorials?
Not that I know off, but you can view the actual code used for a level in the editor, so it shouldn't be hard to figure it out (copy+paste and modify is my favorite tactic).
Can somebody tell me how I can get a custom avatar?
Oh wait, I already got one...
Oh wait, I already got one...
Re: Mission Script Tutorials?
...That's not a sentence. :pSimonDenton wrote:For things like when a flag is set a specific object or person who is in a different map?
You could always flick through the missionscripting tutorials over at DXE (which I wrote, incidentally), but really: there's very little you CAN'T do with an MS, given that they're pretty much just a base framework you can add context-specific code to.
Can you give an example of something you'd like to do?
-
- Human Encyclopaedia
- Posts: 2207
- Joined: Thu Jan 26, 2006 9:50 pm
Re: Mission Script Tutorials?
Take over the world? Get rich? Restart Firefly?DDL wrote:but really: there's very little you CAN'T do with an MS
...
Can you give an example of something you'd like to do?
Re: Mission Script Tutorials?
Invest in Off Topic Productions LLC!
Jonas Wæver
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
Chief Poking Manager of TNM
I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
-
- Human Encyclopaedia
- Posts: 2207
- Joined: Thu Jan 26, 2006 9:50 pm
Re: Mission Script Tutorials?
I had considered something along those lines, but couldn't come up with a satisfactory way to phrase it.
- SimonDenton
- NSF
- Posts: 78
- Joined: Sun Mar 08, 2009 8:32 am
Re: Mission Script Tutorials?
Heres one thing in terms of A,B and C:
A class named A with the event tag of B enters the world when flag C is set.
A class named A with the event tag of B enters the world when flag C is set.
Re: Mission Script Tutorials?
Well, enterworld() only works for scriptedpawns and vehicles, so are we assuming it's a scriptedpawn/vehicle? If it's not you'll probably want to use bHidden instead.
Assuming a scriptedpawn, place it in your map, set bInWorld to false, and give them a tag of "Guy".
And there you go. In fact, something basically EXACTLY like that is in the DXE thread (and that one includes a check for which map it's in, even! ZOMG).
http://www.dxediting.com/forums/showpos ... stcount=23
Assuming a scriptedpawn, place it in your map, set bInWorld to false, and give them a tag of "Guy".
Code: Select all
function timer()
{
local scriptedpawn P;
super.timer();
if(flags.getbool('YourFlagHere') && !flags.getbool('GuyAdded'))
{
foreach allactors(Class'scriptedpawn',P,'Guy')
{
P.enterworld();
}
flags.setbool('GuyAdded',true);
}
}
http://www.dxediting.com/forums/showpos ... stcount=23
- SimonDenton
- NSF
- Posts: 78
- Joined: Sun Mar 08, 2009 8:32 am
Re: Mission Script Tutorials?
Thanks! So if it is an information device I just change the bHidden to true right?
Thanks again DDL
Thanks again DDL
Re: Mission Script Tutorials?
Ayup. And then instead of
you have
(where I is the locally declared information device)
On the offchance you're having collision issues, you can also set the deco/infodevice/whatever to bCollideActors=false, and then use (again with our information device as above)
Code: Select all
P.enterworld();
Code: Select all
I.bhidden=false;
On the offchance you're having collision issues, you can also set the deco/infodevice/whatever to bCollideActors=false, and then use (again with our information device as above)
Code: Select all
I.setcollision(true,I.bBlockActors,I.bBlockPlayers); //sets bcollideactors to true, leaves blockactors/players as they were