La Centrale ~ Super MMORPG Maker Box
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
-39%
Le deal à ne pas rater :
Pack Home Cinéma Magnat Monitor : Ampli DENON AVR-X2800H, Enceinte ...
1190 € 1950 €
Voir le deal

Vous n'êtes pas connecté. Connectez-vous ou enregistrez-vous

[Ajout-SMMOB] Créer une Pipette [Niveau: Très Facile] [By mimus]

2 participants

Aller en bas  Message [Page 1 sur 1]

Aurusse

Aurusse
Administrateur
Administrateur

Bonjour à toutes et tous,

voici un excellent script, créé par mimus.

mimus a écrit:
Créer une Pipette


Bonjours aujourd'hui j'ai fait un petit code fort utile, pour quand on travaille a plusieurs mappeur et qu'on ne sais pas ou se trouve le tile utilisé pour la mappeur qui nous a précédé.

Fonctionnement:
Quand l'on clique sur le bouton centrale de la souris (bouton molette) cela récupère les informations de la case selon la couche si on est en mode Dessin ou l'attribut si on est en mode Attribut.

Code Source:
Allez dans modGameEditors.
Puis dans le Sub MapEditorMouseDown.

Après:
Code:
If Not isInBounds Then Exit Sub

Copier le code suivant:
Code:
If Button = vbMiddleButton Then
        If frmEditor_Map.optLayers.value Then
            EditorTileWidth = 1
            EditorTileHeight = 1
            EditorTileX = Map.Tile(CurX, CurY).Layer(CurLayer).X
            EditorTileY = Map.Tile(CurX, CurY).Layer(CurLayer).Y
            shpSelectedTop = EditorTileY * PIC_Y
            shpSelectedLeft = EditorTileX * PIC_X
            shpSelectedWidth = PIC_X
            shpSelectedHeight = PIC_Y
            frmEditor_Map.scrlTileSet.value = Map.Tile(CurX, CurY).Layer(CurLayer).Tileset
            frmEditor_Map.scrlAutotile.value = Map.Tile(CurX, CurY).Autotile(CurLayer)
        ElseIf frmEditor_Map.optAttribs.value Then
            frmEditor_Map.optBlocked.value = False
            frmEditor_Map.OptAntiSandBox.value = False
            frmEditor_Map.optWarp.value = False
            frmEditor_Map.optItem.value = False
            frmEditor_Map.optNpcAvoid.value = False
            frmEditor_Map.optResource.value = False
            frmEditor_Map.optNpcSpawn.value = False
            frmEditor_Map.optShop.value = False
            frmEditor_Map.optBank.value = False
            frmEditor_Map.optHeal.value = False
            frmEditor_Map.optTrap.value = False
            frmEditor_Map.optSlide.value = False
            frmEditor_Map.optEvent.value = False
           
            With Map.Tile(CurX, CurY)
                If .Type = TILE_TYPE_BLOCKED Then frmEditor_Map.optBlocked.value = True
                If .Type = TILE_TYPE_ANTISANDBOX Then frmEditor_Map.OptAntiSandBox.value = True
                If .Type = TILE_TYPE_WARP Then
                    frmEditor_Map.optWarp.value = True
                    EditorWarpMap = .Data1
                    EditorWarpX = .Data2
                    EditorWarpY = .Data3
                    frmEditor_Map.scrlMapWarp.value = .Data1
                    frmEditor_Map.scrlMapWarpX.value = .Data2
                    frmEditor_Map.scrlMapWarpY.value = .Data3
                End If
                If .Type = TILE_TYPE_ITEM Then
                    frmEditor_Map.optItem.value = True
                    ItemEditorNum = .Data1
                    ItemEditorValue = .Data2
                    frmEditor_Map.scrlMapItem.value = .Data1
                    frmEditor_Map.scrlMapItemValue.value = .Data2
                End If
                If .Type = TILE_TYPE_NPCAVOID Then frmEditor_Map.optNpcAvoid.value = True
                If .Type = TILE_TYPE_RESOURCE Then
                    frmEditor_Map.optResource.value = True
                    ResourceEditorNum = .Data1
                    frmEditor_Map.scrlResource.value = .Data1
                End If
                If .Type = TILE_TYPE_NPCSPAWN Then
                    frmEditor_Map.optNpcSpawn.value = True
                    SpawnNpcNum = .Data1
                    SpawnNpcDir = .Data2
                    frmEditor_Map.lstNpc.ListIndex = .Data1 - 1
                    frmEditor_Map.scrlNpcDir.value = .Data2
                End If
                If .Type = TILE_TYPE_SHOP Then
                    frmEditor_Map.optShop.value = True
                    EditorShop = .Data1
                    frmEditor_Map.cmbShop.ListIndex = .Data1
                End If
                If .Type = TILE_TYPE_BANK Then frmEditor_Map.optBank.value = True
                If .Type = TILE_TYPE_HEAL Then
                    frmEditor_Map.optHeal.value = True
                    MapEditorHealType = .Data1
                    MapEditorHealAmount = .Data2
                    frmEditor_Map.cmbHeal.ListIndex = .Data1 - 1
                    frmEditor_Map.scrlHeal.value = .Data2
                End If
                If .Type = TILE_TYPE_TRAP Then
                    frmEditor_Map.optTrap.value = True
                    MapEditorHealAmount = .Data1
                    frmEditor_Map.scrlTrap.value = .Data1
                End If
                If .Type = TILE_TYPE_SLIDE Then
                    frmEditor_Map.optSlide.value = True
                    MapEditorSlideDir = .Data1
                    frmEditor_Map.cmbSlide.ListIndex = .Data1
                End If
                If .Type = TILE_TYPE_EVENT Then
                    frmEditor_Map.optEvent.value = True
                    MapEditorEventIndex = .Data1
                    frmEditor_Map.scrlEvent.value = .Data1
                End If
            End With
        End If
    End If

Voilà si vous avez des questions n'hésité pas.

Bloodjoker

Bloodjoker
Newbie
Newbie

Excellent, je vais m'amuser.
Merci.

Revenir en haut  Message [Page 1 sur 1]

Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum