Paperdoll's

I want to do something along the lines of this.

In mod general -

Select Case GetPlayerDir(index)
ReDim PaperdollOrder(1 To Equipment.Equipment_Count - 1) As Long
    Case DIR_DOWN
        PaperdollOrder(1) = Equipment.Shield
        PaperdollOrder(2) = Equipment.Legs
        PaperdollOrder(3) = Equipment.Armor
        PaperdollOrder(4) = Equipment.Helmet
        PaperdollOrder(5) = Equipment.Weapon
    Case DIR_UP
        PaperdollOrder(1) = Equipment.Weapon
        PaperdollOrder(2) = Equipment.Legs
        PaperdollOrder(3) = Equipment.Armor
        PaperdollOrder(4) = Equipment.Helmet
        PaperdollOrder(5) = Equipment.Shield
    Case DIR_LEFT
        PaperdollOrder(1) = Equipment.Weapon
        PaperdollOrder(2) = Equipment.Legs
        PaperdollOrder(3) = Equipment.Armor
        PaperdollOrder(4) = Equipment.Helmet
        PaperdollOrder(5) = Equipment.Shield
    Case DIR_RIGHT
        PaperdollOrder(1) = Equipment.Shield
        PaperdollOrder(2) = Equipment.Legs
        PaperdollOrder(3) = Equipment.Armor
        PaperdollOrder(4) = Equipment.Helmet
        PaperdollOrder(5) = Equipment.Weapon
    End Select

But whenever i try to declare “index”, it says i need the startup form. So i tried putting there a public sub called PaperdollLayout in GameLogic. The code in that sub was the code above. Then i put

Call PaperdollLayout

In ModGeneral, but it tells me that the “Argument is not optional”. I’m really confused as to what to do. Could someone please help me?

Your first line relies on an Index already, you’d need to pass a variable into your sub to get it to work. 😛 e.g. Public Sub PaperdollLayout(Byval Index as Long), then call it as such:

Call PaperdollLayout Index

or whichever value you need for the Index, you’ll be calling this EVERY time you render a player’s paperdoll though, remember that. If you only call it when your own character moves it’ll look silly on everyone else. :]

Oh wait. So say my dir is down, the paperdoll order of someone with a DIR_UP, to my perspective, would have the DIR_DOWN paperdoll order?

yes, unless you call this every time you render someone’s equipment. :]

Log in to reply