influogames's Recent Forum Activity

  • Ok, Meu jogo tem apenas uma fase onde ocorrerá todos os eventos do jogo. Assim que o jogador atingir certa pontuação (exemplo: atingir 1.000 pontos), ele ira subir de nível (exemplo: nível atual "1", após atingir 1.000 pontos. Nível 2).

    This is a VERY simplified version of what you want, just comparing the variables and incrementing the level. You still need an event which adds points but we don't know what your game is.

  • Sorry guys! I've read about the forum rules but just forgot about that point... I'll translate my previous posts.

  • It's a little vague about exactly what you want. I don't know if you need help with the variables and the level-up condition event or if you need help after all of that.

    Ficou um pouco vago sobre o que você quer exatamente. Não sei se você precisa de ajuda com as variáveis e o evento com a condição do nível aumentando ou se você precisa de ajuda após isso.

  • You do not have permission to view this post

  • Oh, okay, you can use XML.StringValue("/Niveau/" & Sprite.ObjectTypeName & "/text()")

    The "Sprite" there is your Sprite Object, just replace it with yours.

  • Even if it use ajax. The game can be play offline?

    Yes, but only if you are using the Request a project file action.

  • I struggle with the XML road.

    So, if you want to understand better how the XML works, I recommend you to read the XML manual from Construct website. Then, you'll notice the following phrase from there:

    It uses XPath to access the XML document.

    Then, check this website to understand XPath. It is quite simple with lots of examples and shouldn't take you too much time.

    Okay, having said that... The XML syntax follows a hierarchical rule. When you want to retrieve a value from an XML element you need to correctly follow the path from your nested tags. For example:

    Imagine you want to get the value from the tag <A> which is within the tag <1>. Because <A> is nested within <1>, and <1> is nested within <Niveau>, you have to follow the hierarchical path. That's why the path to get the StringValue is "/Niveau/1/A/text()".

    Now...

    Instead of "1" and "A" I want to put the name of the sprite in the XML line.

    From what I understand, you would like to do this?

    <Niveau>
    	<1A>open</1A>
    	<1B>open</1B>
    	<1C>close</1C>
    	<1D>open</1D>
    
    	<2A>open</2A>
    	<2B>open</2B>
    	<2C>close</2C>
    	<2D>close</2D>
    	<2E>close</2E>
    </Niveau>
    
  • You do not have permission to view this post

  • So, firstly, you need to load your XML file using AJAX. And then you can use one of the XML expressions (NumberValue or StringValue) to retrieve your data. For example: Xml.StringValue("/Niveau/1/A/text()").

    I guess you have looked on this tutorial right? construct.net/en/tutorials/read-xml-game-talk-518

    I think it does a good job guiding you step by step. But if you still can't make your game work, come back here again!

  • Well, based on the images there's nothing wrong with your settings. Unless you have set the particle's Timeout to 0, or the sprite "Als..." which you are spawning the particle from, is off screen.

    Or maybe, even simpler, you have not placed an instance of your particle in any layout.

  • Having said that, I agree that for a starting user or for someone who doesn't know about coding may think function maps are too confusing and even overkill, demanding a lot more typing than using a bunch of if-elses. And for a small project it is true indeed.

    But, for a huge game with lots of levels, upgrades, skills, and so on, mapping functions to execute similar actions with different parameters will be a huge boost in your coding process and also with readability and maintenance (just like the JSON dialogue system Laura_D has pointed).

    So, what I really wanted to say is that function maps (along with the scripting feature) is a powerful tool that allows us to make bigger projects, and elevates Construct 3 level against other competitor game engines.

  • Well, I see function maps as a form of polymorphism concept. But that's because I come from an object-oriented programming language background. So, for me it is a very interesting way to make your code more extendable, like, making your functions more reusable. I think it could also be useful to implement delegates/callbacks (or at least a resemblance of that).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
influogames's avatar

influogames

Member since 7 Mar, 2013

Twitter
influogames has 165 followers

Connect with influogames

Trophy Case

  • 11-Year Club
  • Entrepreneur Sold something in the asset store
  • x5
    Popular Game One of your games has over 1,000 players
  • x3
    Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

20/44
How to earn trophies