Author Topic: rem firepower from other maps  (Read 2871 times)

Anonymous

  • Guest
rem firepower from other maps
« on: 2005-09-18, 09:46:16 AM »
If anyone can help, I'm looking for a subscript that will disable the shooting that scripting wizard sets up. When I change maps I'm getting an error when pressing any of the firepower buttons.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
rem firepower from other maps
« Reply #1 on: 2005-09-18, 03:40:27 PM »
Would it work to just make the shots require inventory (that's an option in the scripting wizard) and remove the inventory when you get to a map where shooting is disabled?

But if not, just as an example, I think you can just put this as the first line of your Sub Player_OnControllerMove:
Code: [Select]
If Right(ProjectObj.GamePlayer.rMap.Name,1) = "_" Then Exit Sub
That line would ignore all script for pressing buttons if the current map name ends with "_".  Then you can rename all the maps where the player should not shoot so that they end with a "_".  There are many other tricky ways to make this easy.  This is just one.  (If you have more maps where the player should not shoot than maps where they should shoot, then you should change the = to <> and put the "_" on the maps where the player can shoot.)

Anonymous

  • Guest
rem firepower from other maps
« Reply #2 on: 2005-09-18, 10:26:53 PM »
I ended up using inventory to control it. but the script is nice too. thanks !