You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Editing  \  Its Nice to be in Control

Back to Threads

Viewing Thread: Its Nice to be in Control

 

James Bunting
Joined: 17 September 2003
Posts: 1308
19 May 2004 10:41 (UK time)

Forget the M1 message triggers, think more univeral triggers.

M2 will use a open trigger system which will replace all switches and message triggers etc. A universal trigger can simply be slapped on a map (they can be resized too) and have code behind it to do a whole bunch of things including...

<ul>
<li>Moving/deleting/rotating sectors</li>
<li>Waking up/killing/adding units (or objects)</li>
<li>Calling in reinforcements (either side)</li>
</ul>

Of course the simple commands like playing sounds, music and displaying messages are there. It is even possible to call other triggers and set up a whole scripted sequence of events.

You need to login to create posts in this thread.

Was this really FBI?
(no longer an active user)


Joined: 22 June 2004
Posts: 207
22 June 2004 19:49 (UK time)

That had been very cool, but can we continue with message triggers too?

You need to login to create posts in this thread.

James Bunting
Joined: 17 September 2003
Posts: 1308
01 July 2004 00:31 (UK time)

Oh yeah its just a matter of putting in commands.

When you open a triggers settings you get a text box (like Notepad).

You then type stuff in like:

// show a message
GameMessage "Welcome to Base Foxtrot"


** OR **

SetItem "bullets", 50
Giveitem "pistol", 1

PlaySound "doors/slide"

// move sector 10, 100 pixels down at speed 5
MoveSector 10 0 100 5

HideSector 11

// update terrain info
UpdatePassableMap
UpdateMiniMap

// play a sound originating from coords 100,100
PlayDirectionalSound "world/IntruderAlert" 100 100

// wait 2 seconds
wait 200

// SetObjectAngle 10, 192
BindObjectToTrack 10, 6
WakeObject 10

HideObject 11
HideObject 12
HideObject 13


You need to login to create posts in this thread.

Assain

Joined: 02 November 2003
Posts: 979
01 July 2004 19:46 (UK time)

Thats sounds really awsome! Total Convervesion are going to be alot more awsome to create now! Will this system be in the beta? Its cooler than some other game's script editor, for the other game's editors are alot more complex and usualy require that all objects require a script inorder for them to do something.

You need to login to create posts in this thread.

me_mantis

Joined: 26 September 2003
Posts: 1152
03 July 2004 01:10 (UK time)

will switches act 1 time or will they be able to be used again? think a switch that rotates a bridge 1 degree every second stay on the switch 90 seconds and the bridge sector allows you to cross a river

=)

You need to login to create posts in this thread.

Raaka-arska

Joined: 22 September 2003
Posts: 109
20 July 2004 10:02 (UK time)

Hmm will there be triggers what would affect another map? ie: If you destroy communications truck in mission1, mission2 wouldn't have enemy reinforcements, but if I wouldn't destroy it mission2 would be harder with enemy reinforcements.
Did you get the idea?

You need to login to create posts in this thread.

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
21 July 2004 02:51 (UK time)

You know, if you could do that in M1, that would of helped my mod a lot, like in one part, you get into a building called the X-Labs, and at one point you have the oppurtunity to continue with your mission or destroy the alien hive that is being spawned right near it. And if you continued with your mission, the aliens would be a serious problem in the next level.

I like the idea, but youd probably have to put in reinforcements and save the map as something else, so youd bomb the truck, maybe that could open a door to a secret entrance.
*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.

Flammable Maniac

Joined: 30 June 2004
Posts: 209
22 July 2004 22:52 (UK time)

Great idea! Like it very much!

Please consider it, almighty James B.!

You need to login to create posts in this thread.

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
15 August 2004 05:51 (UK time)

Will there settings built in with the map editor? its gonna take me forever to figure out how those triggers work, you know, typing things like

//sound//

wait 5 seconds
play sound/blast

That wont work of course, maybe there can be an easy to use menu of triggers, rather than typing 'exact' information
*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.

Assain

Joined: 02 November 2003
Posts: 979
15 August 2004 22:33 (UK time)

about the things with the comm truck, you can (sorta) do it already (as in M2 script functions). All you need to do is put a trigger on the truck that makes it so when it dies, it changes the exit of the level to the other.

You need to login to create posts in this thread.

James Bunting
Joined: 17 September 2003
Posts: 1308
16 August 2004 15:59 (UK time)

I am just getting the scripting installed and can confirm a few facts.

1) The scripts will run as instances, you can runs loads at once and they don't stop the game.

2) They will be written in C with standard C stuff like variables and loops etc. A number of specially written C functions will be available in the scripts which will let you control stuff at just about any level.

3) There will be plenty of templates and stuff so it will be amazingly easy to write your own scripts.

4) There will be one script per map (mapfilename.sc), you can use triggers to call functions in your script or you can run a single available (not in your script) command directly from the trigger (i.e. SC_CompleteCurrentLevel(); )

5) Maps do not require scripts to work, scripts can be used if you want to do clever stuff. If you want to make basic maps then just edit M1 style (you will need an end level trigger and thats it).

6) You edit scripts in Notepad (or any other text editor).


Here is a sample script (the commands used may change), its not that simple but it demonstrates some basic commands.

#title "M2 example SeeR script"
#author "James Bunting"

// here we tell M2 that it can use the function main
export main;

// import external functions - declare M2 functions that will be available in this script
import void SC_ChangeSectorTexture( int SectorNumber, char *TextureName);
import int JG_MessageBoX(char *,...);
import int MSG_Message(char *,...);
import void AUD_PlayDirectionalSound( char *, int , int);
import int TestInt;
import int JG_StringInputBoX( char *, int, char *);
import void strcpy( char *, char *);




// This is the "main" function which is exported above, it can be called anything you like.
// simply put "run main();" in your script to run it.

int main()
{
int i;
char name[ 64];

// change a couple of sector textures by thier IDs
SC_ChangeSectorTexture( 0, "stone05.pcx";);
SC_ChangeSectorTexture( 1, "lava03.pcx";);

// a name input box, pointless but a good demo of "scripting power"!
if( JG_StringInputBoX( name, 63, "Enter your name";))
{
JG_MessageBoX("Your name is %s", name);
}

// play a sound from coords 100, 100
AUD_PlayDirectionalSound( "doors\\slide_o", 100, 100);

// show a hint message on the screen
MSG_GameMessage("test";);

// show a message box
JG_MessageBoX("Hello world!";);

// run a C for loop and print some numbers to the M2 console
for( i=0; i<15; ++i)
MSG_Message("i = %d", i);

return 0;
}







You need to login to create posts in this thread.

Agent Nightfire

Joined: 21 August 2004
Posts: 223
22 August 2004 00:59 (UK time)

I like this new way of message triggers. It gives more to the game.

You need to login to create posts in this thread.

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
22 August 2004 06:17 (UK time)

Yah, when the triggers are in theres really nothing you can't do with this game, you could make pretty much any mod you want! I hope to make something similar to a Grand Theft auto mod, since I thought of Grand Theft Auto when I first played this game. (The Bird's Eye View)
*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.

Agent Nightfire

Joined: 21 August 2004
Posts: 223
30 August 2004 19:42 (UK time)

Kool. Waz it the download I showed you? And thanx for helping me put that on.

You need to login to create posts in this thread.

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
31 August 2004 15:06 (UK time)

Yep, not sure which GTA exactly, but I know it will be fun! I'm not sure which GTA to choose from, GTA1, GTA2, GTA3, or GTA Vice. I'm deciding between 1 and 3 since they were both my favorites. I think I'll start with 1.
*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.

Was this really FBI?
(no longer an active user)


Joined: 22 June 2004
Posts: 207
31 August 2004 17:43 (UK time)

I like GTA3, I do never get tired of the game.

You need to login to create posts in this thread.

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
01 September 2004 14:48 (UK time)

Thats true, although I havent played the game in a long time, its still fun everytime I play it.
*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.

Dominic
Joined: 02 January 2005
Posts: 13
17 January 2005 02:34 (UK time)

Okay okay im about to explode and splatter the whole world with my guts! Ive read time after time of the change log where it tells you commands and the only one i get is message one! Is there anyway you can make it so a person like me can understand it? The main thing is what i dont get is like the stuff like a?=s? and stuff like that if your really genorus you can just email it to me lol

djsmith123@msn.com

-M1 map maker (trying to figure out M2 but it confuses me ahhh go away evil triggers nooo dont eat meeee noooo!)

:-)

You need to login to create posts in this thread.

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
19 January 2005 01:47 (UK time)

Lol I actually used notepad to make a list of triggers that "I" can understand. Maybe I could send it to you, but even you may have trouble since when I take notes, I am pretty sloppy and skip words and what not. (I still have trouble with triggers so some of my triggers may not even be theorettically correct)
*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use