Location: JBPLAY \ Meteor 2 \ Help and Guidance \ Scripting help needed Back to Threads |
VR_Rat
![]() Joined: 20 January 2006 Posts: 396 |
24 January 2006 14:09 (UK time)
I'm trying to make it so that when you begin the map meteor creates a toolbar that you can select a weapon from and then creates another toolbar for a second weapon. The code looks fine to me but it doesn't work. Can somebody help me? You need to login to create posts in this thread. |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
24 January 2006 14:59 (UK time)
Unfortunatly, IE cannot download .sc files, so I cannot see the script file you uploaded. If you zip the files, its much easier to get at. For scripting help try <a href="http://meteormods.com/meteor2/ModdingHelp/"> This page</a> Making toolbars is very complicated, so don't feel bad if you can't figure it out. You need to login to create posts in this thread. |
VR_Rat
![]() Joined: 20 January 2006 Posts: 396 |
24 January 2006 15:15 (UK time)
Sorry. Nothing on that site relates to fixing my toolbar buttons. Edited: 24 January 2006 15:19 You need to login to create posts in this thread. |
Assain
![]() Joined: 02 November 2003 Posts: 979 |
24 January 2006 16:38 (UK time)
Yes, toolbars can get alittle tricky, and the scripting help page/map doesnt cover the newest features (mabey the map should get updated?). I DO know that Aleks was able to do a toolbar thing in one of his multi-player maps that he made, and it was pretty sweet (you could buy weapons with an item called a "credit" that he layed around the map). You need to login to create posts in this thread. |
VR_Rat
![]() Joined: 20 January 2006 Posts: 396 |
24 January 2006 16:52 (UK time)
Did you look at the zip? It say that it has a compile error with one if the void lables and an Error no: 2. I did export the label if you were wondering. I don't think I needed to include the map in the zip now that I think about it. You need to login to create posts in this thread. |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
24 January 2006 18:09 (UK time)
I found your error before I started the game. I then played your map with no trouble. The map looks awesome.. Nice job with the shaded textures. your problem was not closing the brackets on the end of the functions. It also had a few errors that can easily be corrected once you play the map. void machinegunprime() { if( SC_ConfirmBo ![]() ![]() { SC_GiveItem("Machinegun", 1); SC_GiveItem("Bullet", 300); SC_DestroyToolbar(0, 1); SC_CreateToolbar( 0, "Secondary Weapon Select", 0, 0, 1, 1,); SC_AddToolbarButton( 0, "Pistol", "hud\\Weapon_Glok01_01.pcx", "run pistolgunsecond", 1); } else { return; } }//OOPS!!! you didn't have the } you needed here. You have to always have a starting, and ending bracket. void shotgunprime() { if( SC_ConfirmBo ![]() ![]() { SC_GiveItem("Shotgun", 1); SC_GiveItem("Shotgun Shells", 50); SC_DestroyToolbar(0, 1); SC_CreateToolbar( 0, "Secondary Weapon Select", 0, 0, 1, 1,); SC_AddToolbarButton( 0, "Pistol", "hud\\Weapon_Glok01_01.pcx", "run pistolgunsecond", 1); } else { return; } }//OOPS!!! you didn't have the } you needed here. You have to always have a starting, and ending bracket. void pistolgunsecond() { if( SC_ConfirmBo ![]() ![]() { SC_GiveItem("Pistol", 1); SC_GiveItem("Bullet", 300); SC_DestroyToolbar(0, 1); SC_SetObjectMaxSpeed(SC_GetPlayerObjectId(),6); } else { return; } }//OOPS!!! you didn't have the } you needed here. You have to always have a starting, and ending bracket. You need to login to create posts in this thread. |
VR_Rat
![]() Joined: 20 January 2006 Posts: 396 |
24 January 2006 18:16 (UK time)
Thank you so much. I'll have to be more carful with the brackets next time. You need to login to create posts in this thread. |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
26 January 2006 21:00 (UK time)
If your mp competition map looks anywhere near that good, you are in good shape. You need to login to create posts in this thread. |
VR_Rat
![]() Joined: 20 January 2006 Posts: 396 |
28 January 2006 00:07 (UK time)
I'll try making a bigger version of that map. Only problem is I'm not so good at big maps. I have trouble with leaving big empty spaces lying around and if there IS a sector limit it will kill all the detail. You need to login to create posts in this thread. |
mike323
Posts: 745 |
28 January 2006 02:04 (UK time)
I definately agree with a lot of small maps as opposed to a few huge maps. You need to login to create posts in this thread. |
|
Forums system (C) 1999-2023 by James Bunting.
Terms of Use