Gérez votre site :

52 646 Webmasters - 773 093 Membres INSCRIPTION - Mot de passe oublié ?

Discussion du forum

News

Vous êtes sur la discussion [Faire une action pour un objet]

Forum :: Questions IF :: Discussion
Ouvert [Faire une action pour un objet]
de Fabien (chibiworld - créé le 14 mai 2013 à 16h 58
4 reponses - 263 vues
modifié il y a 11 ans
Bonjour,enfaite je suis en pleine construction de mon jeu J'aimerais faire dans mon magasin un monde [Exemple; achète ton monde ton chibi's seras heureux] J'aimerais quand on a acheté,l'objet [Le monde] Une action apparaît et voilà mais sinon,si ça n'existe pas une action déjà sur la page mais si on clique dessus et qu'ont a pas de monde elle dirait; Achète ton monde au magasin

Est-ce possible ?
Voici les réponses de cette discussion : (page 1/1)

le 14 mai 2013 à 18h 13 (il y a 11 ans)
En ligne eRadication (skymm
So, if I understand what you want, is that when the object is bought, an action appear. I don't think that there's a programmation way to do that. The possibility I see with that need a variable for the action.

By exemple, when the object will be use, the VarObject will grow of one and, in your page, if VarObject is equal to one, well, the action appear. After, it depend if you want that the action would be able to click only once! There the two code I though about:

#The [Mod ActionZ] doesn't have any special attribute, except if you want that the action can be use only once. If it's the case, [Mod ActionZ] gives one to VarObject. There it depends of what you want further!

First code : [IF VarObject < 1]Don't wait before buying a World for your Chibi's[/IF][IF VarObject = 1]Something [Mod ActionZ][/IF][IF VarObject = 2]Something... [/IF]

Hope it helps! If you have any other questions or if my answer didn't help you; I'll be pleased to answer you again!
le 14 mai 2013 à 18h 20 (il y a 11 ans)
En ligne Ryan (mon-zebre
Tu crée une variable X
Un Objet Y
Une action W
[IF VarX >= 1][Mod ActionW][/IF]

Tout simplement
le 14 mai 2013 à 18h 42 (il y a 11 ans)
En ligne Fabien (chibiworld
Je n'ai pas trop compris.
le 15 mai 2013 à 12h 21 (il y a 11 ans)
En ligne Green (ecoland
Ton objet doit agir sur une variable spécialement créée pour cela. Celle-ci ne doit pas être un besoin. L'objet ajoute 1 à cette variable. Et après, tu mets le code que Ryan a écrit au-dessus.
Poster un message
Veuillez vous connecter pour poster sur le forum.

Webidev | v2.10.0 | © Webidev 2007 - 2024 | Contact