Location: JBPLAY \ Meteor 2 \ User Announcements \ A nice script package that might help Back to Threads |
arezey Joined: 16 June 2005 Posts: 1599 |
01 February 2006 20:35 (UK time)
I made a nice script package by coding my second DAT file. By inserting a line: #include "C:\games\meteor2\base\maps\scriptpack.dat" opens you up 6 more scripts. Actually, made up of multiple script lines. I quess you can't insert them in a single line, I think you need to put the scripts into the *.sc file. Here are the scripts this dat file offers <hr> void SC_KillObject( int ObjectId); Kills an object ObjectId is the ID of the object to be killed <hr> void SC_KillMultipleObjects( int SmallestObjectId, int LargestObjectId); Kills multiple objects at a time. SmallestObjectId is the object with the smallest ID to be killed LargestObjectId is the object with the largest ID to be killed For example: SC_KillMultipleObjects(64,85); kills all objects 64,65,66,67,68,69,70... and all over to 85. <hr> void SC_SetMultipleSectorsHidden( int SmallestSectorId, int LargestSectorId, int Hidden); Hides multiple sectors at a time. SmallestSectorId is the sector with the smallest ID to be hidden LargestSectorId is the sector with the largest ID to be hidden Hidden is the hidden value, 1 for hide, 0 for show <hr> void SC_SetMultipleObjectsHidden( int SmallestObjectId, int LargestObjectId, int Hidden); Exactly as SC_KillMultipleObjects, but they are hidden and Hidden is the hidden value, 1 for hide, 0 for show <hr> void SC_SetMultipleObjectsLocked( int SmallestObjectId, int LargestObjectId, int Locked); Exactly as SC_SetMultipleObjectsHidden, but they are locked this time <hr> SC_TellTheItemCount( char *ItemName); Tells how much you have an specific item. It tells the amount of ItemName. For example: SC_TellTheItemCount("Rocket" returns in a game message 10 at the start. You need to login to create posts in this thread. |
VR_Rat Joined: 20 January 2006 Posts: 396 |
01 February 2006 20:50 (UK time)
What is this? - The link isn't working. Edited: 01 February 2006 20:52 You need to login to create posts in this thread. |
me_mantis Joined: 26 September 2003 Posts: 1152 |
02 February 2006 04:02 (UK time)
you sure that linking from a script does that stuff, or were all your tries from a map? I have done a lot of experimentation with this, and have had bugs where the map.sc cannot call functions in the extrawhatever.dat. The actual map file can call the functions, but that somewhat limits the use. You need to login to create posts in this thread. |
arezey Joined: 16 June 2005 Posts: 1599 |
02 February 2006 16:31 (UK time)
OK. I can post the code of the scriptpack. Just don't export them. You need to login to create posts in this thread. |
VR_Rat Joined: 20 January 2006 Posts: 396 |
10 February 2006 01:03 (UK time)
The Link still isn't working for me . You need to login to create posts in this thread. |
arezey Joined: 16 June 2005 Posts: 1599 |
10 February 2006 11:10 (UK time)
Yes yes yes yes yes... You need to login to create posts in this thread. |
VR_Rat Joined: 20 January 2006 Posts: 396 |
10 February 2006 23:16 (UK time)
So what is the point of this? You need to login to create posts in this thread. |
VR_Rat Joined: 20 January 2006 Posts: 396 |
11 February 2006 14:03 (UK time)
If I were to make my own script commands, how would it be done? You need to login to create posts in this thread. |
arezey Joined: 16 June 2005 Posts: 1599 |
11 February 2006 14:47 (UK time)
Like this: #title "" #author "" #include meteor2 export OnMapStart; // internal scripts <b>void SC_KillMultipleObjects( int SmallestObjectId, int LargestObjectId) { // store the variable int ObjectIds; // use the for statement to do this thing for( ObjectIds=SmallestObjectId; ObjectIds<=LargestObjectId; ++ObjectIds) { // kill the result SC_SetObjectHits(ObjectIds, 0); } } </b> void OnMapStart() { SC_KillMultipleObjects(1,6); // kills objects between 1 and 6 } Remember that you <b>do not need to export</b> these scripts. You can do this for any script trigger by putting the script in the text file before any other triggers. Edited: 11 February 2006 14:49 You need to login to create posts in this thread. |
VR_Rat Joined: 20 January 2006 Posts: 396 |
11 February 2006 20:39 (UK time)
I mean make my own, not use them. You need to login to create posts in this thread. |
James Bunting Posts: 1308 |
11 February 2006 20:40 (UK time)
Hey I am in the chat! You need to login to create posts in this thread. |
|
Forums system (C) 1999-2023 by James Bunting.
Terms of Use