Rable's Forum Posts

  • Hi,

    You probably have a "time" variable in your project. When the player succeed the level just put a new event :

    system > add to > score

    And add the remaining time value to the score.

    You could also enter time*10 or such things.

    Hope it helps! Good luck!

  • One thing you could try is to place a very small invisible object on the border of the ledge, then place precisely the origin of your character object so that it is correctly placed next to the ledge during the climb animation. For example, if your character is hanging to the ledge by his hands, place the origin on the characters' hands for this frame. Then just set the character's position to the invisible object's position as soon as he is attached to the ledge.

    I wouldn't bother to move the character's Y position while he is climbing if you have a climb animation. Adjusting the origin for each frame seems more consistent.

    Good luck!

  • Hi,

    It heavily depend on the type of game you want to make. IMO a local multiplayer is not always more difficult to do than a single player game. For example a one player shmup or 2 players shmup is the same difficulty.

    Is there any built-in templates close to the genre you're looking for in C2? If so, I'd suggest choosing a one-player template and then trying to add a second player.

    Good luck!

  • I would pay for a native export addition, everything same as C2, with native export for PC, iOS, Android and Consoles.

    ps. We still have a broken Linux and MAC export since NWjs is bugged (fails to load, red bar) for those platforms for ages.

    Native or better export options are #1 on my wishlist by far. No way to export to consoles (Wii U excepted) is the biggest C2 flaw IMO.

    Better options for isometric games is #2 (on my wishlist).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the link. I'll check with the technical guys if this is required.

  • gumshoe2029

    Thanks a lot for your concern, but I don't really need something 100% secure. I use this session ID just to figure out that the score of this game has already been injected in the database sooner. It isn't related to password or anything that need high security.

    But it is very possible that one day I'll need something cryptographically secure, so I'll refer to this post if it happens.

    Thanks again!

  • gumshoe2029

    Thanks for the reply. The CB Hash plugin is pretty close from what I am looking for. But if I understand this plugin correctly (which I may not) it doesn't seem to me that it generates random strings. As you state yourself, it uses a seed and generate a character string based on it, right?

    So if I use random (1000000) as a seed, well... It does the same job as just using random(1000000) as the unique code in my case. I don't necesarilly need to have that code scripted.

    But anyway, thanks for pointing out the CBHash plugin to me. I installed it and it will be useful someday for sure. <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    EDIT :

    If anyone else need to do this, here is what I did :

    On start of layout

    repeat 30 times --> text > append keyboard.stringfromkeycode(floor(random(42)+48))

    set sessionID to text.text

    And now I've got my text variable sessionID with a unique 30 character string composed of any random character chosen from numbers from 0 to 9, letters from A to Z and a bunch of special characters.

    If you need more information about keyboard.stringfromkeycode and stuff, you should look at this excellent tutorial by Waltan :

    https://www.scirra.com/tutorials/739/your-own-textbox

  • Hi,

    I try to have correct placement of text objects but can't manage to make it work properly. My problem is that depending on the browser, the same text will appear differently.

    Here is an image

    And in Opera, the text is much lower than in Chrome

    As you see, the result in Chrome is good, but it's bad in Firefox. The given example uses the Google Font "Roboto". Changing the Horizontal or vertical allignment or hotspot doesn't help?

    Is there any solution to be more precise while using the Text object, or should I go back to sprite fonts?

    Thanks!

  • Hi everyone,

    I'm currently designing a game for which I need to put an online database with highscores. Thanks to ArcadEd 's excellent tutorial, everything went smoothly, but now I face another problem.

    The game exports scores to the database at the end of every level. This means that if you scored 600 points in level 1 and 700 in level 2, your total score will be 1300. However, as the score is send at the end of every level, this single session will export scores of 600 and 1300 for this player. This is problematic because of course I want only one score to be send per game session, not one per level!

    Is there a way to avoid this?

    One way I thought about doing this is to create a random (long) string of characters and add this to the database under "sessionID" so that each session correspond to a single ID and the score is sent to the same place of the database, thus avoiding multiple scores to be send from the same game.

    Is there a better way to do this that you can think of?

    If not... well I have troubles creating this random string of characters (it should use most ascii characters). I should probably make a loop and append a random character at the end of a variable, but is there any way easier to select any random character than having a random number between 33 and 126 and extracting the character corresponding to this ascii code?

    Not exactly sure how to translate this into Construct 2 either... Or maybe is there any string generator out there in the plug ins?

    Thanks for any help!

  • EDIT : by analysing your capx I've been able to solve the problem! I previously defined the "char" values in each object's properties in the layout. Despite the fact that the values were correct in the debugger, defining all the values on the start of layout like you did fixed the problem.

    Curious, as doing the same in your capx actually works... I should have missed something here.

    Anyway, thanks a lot!

    ---------------------------

    Hi LittleStain and thanks for the answer.

    • The event is triggered once every few seconds
    • "Do something" is normally a function reducing the character's life, but for test purpose, the knight action just says "delete knight", the archer action is "delete archer" etc... Just to be sure it is triggered or not, and it doesn't.
    • Given the "do something" is just delete the object and that it these objects are never created in the event sheet (they are present on the layout)
  • Hello,

    This is a pretty basic thing I am trying to achieve. Still, I can't manage to do it properly. I even thought about posting it in beginner's questions forum but well...

    So I have a family "allies" with 4 object in it : "knight", "berserker", "archer" and "sorcerer". There is a "char" family instance variable, and I defined it to the exact name of the object. So to be clear the "knight" object's "char" variable is defined to "knight", and same for the 3 other objects.

    Now all I want to do is select one of the alive allies at random and know its char value in order to apply a function to him.

    I do :

    Allies health > 0 ("health" is another family instance variable of course)

    (in a subevent) Pick a random allies instance (up to there everything is working fine, I have checked in the debugger)

    (subevents of the previous subevent) Allies char = "knight" --> do something

    Allies char = "berserker" --> do something

    Allies char = "archer" --> do something

    Allies char = "sorcerer" --> do something

    If I'm correct, the "do something" part should apply only to the instance picked at random, but it actually never triggers, for none of the allies.

    Any idea of what I am doing wrong and how I could fix it?

    Thanks in advance!

  • Thanks a lot for sharing. A quick question, does the skew effect requires WebGL?

  • Oh, sorry, I just forgot to add the 4 image points! I was to enthusiastic to take the time to place them. ^^'

    I'll try again and I'm sure it will work this time.

    Thanks!

    Edit :

    Wow, it's working perfectly now! Thanks a LOT R0J0hound , without your code I would have had to use a completely different (and lesser) solution.

    Thanks a lot to rexrainbow too, of course, for the original moveto behavior!

  • [Discussion is getting a bit out of the Moveto Behavior's scope. If that's a problem I'll post this thread in another place]

    R0J0hound

    Wow, this seem to be just what I need! I implemented your code in the game's code, but up to now I didn't manage to get the same result as in your capx... I don't understand very much what's happening, but deleting the "solid" and "pushOutSolid" behaviors and replacing them with your code (updating the player and wall objects with mine, of course) let the player pass through the walls.

    I tried to change the 16 value that you suggested to change, it behaves differently but not really better, being stopped by the walls but "jumping" from one palce to another.

    Any idea of what's happening? Any advice on how to implement your clever code into my game's code?

    Here is the capx of this part of the game :

    https://www.dropbox.com/sh/j9hoth2oty56 ... tKYWa?dl=0

  • rexrainbow

    Thanks for these awesome plugins. Up to now, MoveTo is the best solution I found for making my character move on the world map, used in pair with PushOutSolids.

    However, I still get strange behavior in certain situation, and I thought that I could show you what it is in case you would like to update the behavior.

    Here is an animated gif of the problem :

    http://giphy.com/gifs/3o85xFKfz2HmfuBMCQ

    I think the problem is clear but to explain it further, I just click once just before the character starts walking. At first he goes to the point I clicked... Until he colides with a solid. At that moment he suddenly starts walking around the solid but in the wrong direction (top instead of bottom). I encounter this problem very often, and I'm afraid I won't be able to use your behavior if I cant' find a way around that problem...

    To make things even more clear, here is the same situation with solids visible and colored :

    http://giphy.com/gifs/3oEduGqATSWgHh1JHW

    Is there a way to avoid this problem and to make him move nicely in the correct direction?

    Thanks!