HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Weapon System Help

07-27-2004, 07:41 PM#1
Scyze
All it does is display the message. It does not drop and remove the item, or give the item. What am I doing wrong?

Code:
Bow Check
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-class of (Item being manipulated)) Equal to Miscellaneous
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        BowEquipped[(Player number of (Owner of (Hero manipulating item)))] Equal to False
                    Then - Actions
                        Set BowEquipped[(Player number of (Owner of (Hero manipulating item)))] = True
                        Set Bow[(Player number of (Owner of (Hero manipulating item)))] = (Item being manipulated)
                    Else - Actions
                        Hero - Drop (Item being manipulated) from (Hero manipulating item)
                        Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: You already have a ...
            Else - Actions
                Do nothing

Store Bow
    Events
        Player - Player 1 (Red) types a chat message containing -store ranged as An exact match
        Player - Player 2 (Blue) types a chat message containing -store ranged as An exact match
        Player - Player 3 (Teal) types a chat message containing -store ranged as An exact match
        Player - Player 4 (Purple) types a chat message containing -store ranged as An exact match
        Player - Player 5 (Yellow) types a chat message containing -store ranged as An exact match
        Player - Player 6 (Orange) types a chat message containing -store ranged as An exact match
        Player - Player 7 (Green) types a chat message containing -store ranged as An exact match
        Player - Player 8 (Pink) types a chat message containing -store ranged as An exact match
        Player - Player 9 (Gray) types a chat message containing -store ranged as An exact match
        Player - Player 10 (Light Blue) types a chat message containing -store ranged as An exact match
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                BowStored[(Player number of (Triggering player))] Equal to False
            Then - Actions
                Hero - Drop Bow[(Player number of (Triggering player))] from Hero[(Player number of (Triggering player))]
                Item - Remove (Last dropped item)
                Set BowStored[(Player number of (Triggering player))] = True
                Game - Display to (Player group((Triggering player))) the text: You put your ranged...
            Else - Actions
                Game - Display to (Player group((Triggering player))) the text: Your ranged weapon ...

Take Bow
    Events
        Player - Player 1 (Red) types a chat message containing -draw ranged as An exact match
        Player - Player 2 (Blue) types a chat message containing -draw ranged as An exact match
        Player - Player 3 (Teal) types a chat message containing -draw ranged as An exact match
        Player - Player 4 (Purple) types a chat message containing -draw ranged as An exact match
        Player - Player 5 (Yellow) types a chat message containing -draw ranged as An exact match
        Player - Player 6 (Orange) types a chat message containing -draw ranged as An exact match
        Player - Player 7 (Green) types a chat message containing -draw ranged as An exact match
        Player - Player 8 (Pink) types a chat message containing -draw ranged as An exact match
        Player - Player 9 (Gray) types a chat message containing -draw ranged as An exact match
        Player - Player 10 (Light Blue) types a chat message containing -draw ranged as An exact match
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                BowStored[(Player number of (Triggering player))] Equal to True
            Then - Actions
                Hero - Create BowType[(Player number of (Triggering player))] and give it to Hero[(Player number of (Triggering player))]
                Set Bow[(Player number of (Owner of (Hero manipulating item)))] = (Last created item)
                Set BowStored[(Player number of (Triggering player))] = False
                Game - Display to (Player group((Triggering player))) the text: You draw your range...
            Else - Actions
                Game - Display to (Player group((Triggering player))) the text: Your ranged weapon ...
07-28-2004, 09:25 AM#2
Anitarf
Do you have the Hero variables correctly set? Check that. And you have this in the draw bow trigger:

Set Bow[(Player number of (Owner of (Hero manipulating item)))] = (Last created item)

Also, you don't seem to define the Bowtype variable when the bow is picked up.


And why do you make a new thread about this? Just bump the old one.
07-31-2004, 05:40 AM#3
Scyze
Quote:
Originally Posted by Anitarf
Do you have the Hero variables correctly set? Check that. And you have this in the draw bow trigger:

Set Bow[(Player number of (Owner of (Hero manipulating item)))] = (Last created item)

Also, you don't seem to define the Bowtype variable when the bow is picked up.


And why do you make a new thread about this? Just bump the old one.

Because, I'v learned, that when somebody sees more posts, they think: "Oh, their question is answered; I won't bother looking to help." It may be crude, but in most cases--true.