PDA

View Full Version : scripting problems



darkkingkongman
May 31st, 2014, 12:46
I've just made a new map but I'm having scripting problems. I really could use some help on this. I'm trying to script the level so that when a wizard is killed a quick objective and the bridge becomes available but it doesn't work. What is the script command? Please help.

YourMaster
May 31st, 2014, 13:51
You could try to make sure it is the only wizard on the map, and then use this command:


IF(PLAYER_GOOD,WIZARD==0)

QUICK_OBJECTIVE(1,"You now have a bridge",ALL_PLAYERS)
ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
ENDIF

darkkingkongman
May 31st, 2014, 14:14
You could try to make sure it is the only wizard on the map, and then use this command:
IF(PLAYER_GOOD,WIZARD==0)
QUICK_OBJECTIVE(1,"You now have a bridge",ALL_PLAYERS)ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)END IFTried it with just one wizard, but the information and the bridge appear at the beginning of the level when the Wizard is still on the map. Any other suggestions?

YourMaster
May 31st, 2014, 16:30
This can work, so either a mistake in my script, or how you've placed it. There are a few levels which have something similar, you can copy the script from those. Look at the gamescript of level 102 or 20 or something.

Woudo
May 31st, 2014, 16:32
You most likely haven't set his allegiance correctly.
Go into item/thing mode and hover over the wizard. Press O until his allegiance is HERO.

I'll bet it says he's unowned/unclaimed at the moment. The script is looking at it and going "Oh, there are no (HERO) Wizards left on the map, here's your bridge Mr Player, sir.

Ecarus
June 2nd, 2014, 22:02
If the warlock isnt hero this wont work, you have to correct it into the warlock correct allegiance.

If he is of the blue keeper then you have to write player0 instead of player_good.