ezrubiera's Forum Posts

  • Hi, I want to make some tests, and I want to know how can I limit the fps to 30?

    thanks

    Edit: I am using NW.js to preview and exported game

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • function.Call("get_string", parameter)

    thank you!

  • Hi, I want to call a function to get string from a number passed as parameter to set a variable, like:

    set "variable" to "function.Call("get_string"(parameter))

    but this is not allowed, how can I do this?

  • Use another invisible sprite on top of the platform and check for overlap.

    thanks, good idea

  • I want to know if the player is over a specific object.

    The player has platform behaviour, and the other objects has the jump-thru behaviour.

    Thanks

  • (probably a dumb question)

    is that the same as

    Xnormalised = cos(angle(player.x,player.y,target.x,target.y))

    Ynormalised = sin(angle(player.x,player.y,target.x,target.y))

    ?

    I think yes, I used that formula to get what I wanted.

    Thanks both.

  • So how can I normalize a vector like this?

    X = (target.x - player.x)

    Y = (target.y - player.y)

  • I just logged the text to the console and copied it. I don't know how to generate the actual characters from the keyboard. For control, alt, etc., they return strings, not characters, so you are going to have to search for those strings first, and convert to some special character that can be mapped in SpriteFont. 'Shift' is not reported as a key code.

    Ok mate, thank you very much!

  • korbaach blackhornet Nice, but how did you write that characters? Maybe a stupid question, but I don't know how u did it.

    And also I need 'Ctrl', 'Alt', Shift...

    Thanks, and sorry for too many questions

  • SpriteFont just maps keys to a grid position in the PNG file. Just add some extra characters that you won't use and edit those characters in the PNG to change the graphic to something else (left-arrow...). Since you are mapping keyboard-keys, presumably you are mapping capital letters, so you could use lowercase letters to map to your special keys.

    But to display the letter I use 'Keyboard.StringFromKeyCode(key)', and they keycode of the bound key will not correspond with the 'Left arrow', for example. Am I right?

  • Hi,

    I am working in the key binding menu and I use a custom sprite font to display the actual bound keys. My question is:

    Is there a way to put keys like 'left arrow', 'right arrow', 'space bar' etc in the character set?

  • ok, got it, without changing the layer. Thanks man

  • I don't know how to use it.

    What I do first? Move the object to the new layer and then repositionate it?

  • Hi,

    I have some objects created in the UI layer (no parallax), and I want to move them to another layer preserving the "relative " position. I mean, i nthe UI layer one object can be at 100, 100 (UI layer) but in the real world is 1024, 345. How do I convert the UI position to world position to positionate that objects correctly when I move them to a new layer.

    Thanks.

  • Finally I did it with an array.

    A bidimensional array in which I save in the 0 index the room UID and the subsquent index the IID of the enemy spawners when I kill the enemy that belongs to that spawner.

    So if I go back to that room, and the IID of the spawner is in the array, it does not spawn anything