Unconnected's Recent Forum Activity

  • I have had this question for months, I just haven't had the need to implement it before then.

    Has anybody found a solution or a lead to a solution?

    I'm not wanting to use a soft keyboard as well.

  • I tried &, | and 'make or block' and it always triggers no matter the value I set it to.

    I just think 'not equal to' can't be used to compare more than 1 value.

    I was only curious about this.

    'Equal to' with an 'Else' works similar enough.

  • & = and

    | = or

    0 = false

    1 = true

    condition is true .. actions run

    Thanks I didn't know '&' and '|' could be used to compare more than 1 value at once.

    I had a similar problem, I was using 'not equal' to compare.

    I tried 'make or block' and 'value1|value2'.

    The problem was the events were always triggered.

    I couldn't figure out why, I even restarted C2 to make sure I didn't find a bug.

    if value1 is not equal to apple.

    or

    if value1 is not equal to orange.

    What was happening is if one isn't true the other one will be.

    If value1 is apple, orange, or strawberry it will still trigger because at least one statement will always be true.

    I thought about using & but a variable can't be two values at once.

    I simply changed 'not equal' to 'equal' to make it work, and reorganized some of the events.

    Is there any way to compare a variable to more than one value using 'not equal' that doesn't always trigger?

    I couldn't think of a way. It would be useful to know if it were possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you.

  • I have been using a default Arial font in my projects.

    I am wondering what would happen if a PC or mobile device doesn't have Arial Font installed.

    Will it just default to the device/PC default?

    I am sure safeguards are set in for Arial since it is so used so much.

    I am curious of what would happen if an uncommon font us used, but not set with a Web Font File?

    I was thinking of making an Arial Web Font file and adding it to be safe.

  • I have a Number type variable that gets set to a Text type variable and displayed.

    It is turning an INT into a STR.

    I am rounding the INT variable to show two decimal places before setting it to the STR.

    I am using 'round(N * 100) / 100' as mentioned.

    For the most part it is doing this, but occasionally I will get 1 or 0 decimal places.

    3.49, 4.5, 5.23, 5.75, 6, 6.23

    I believe it is happening when a number is an exact 4.5 or 6 and not +/- a small bit.

    Anybody know how to prevent this?

    ****************************************

    I found the answer.

    https://www.scirra.com/tutorials/678/in ... -functions

    You basically have to do what was mentioned above.

    You have to do Math for both sides of the decimal point.

    zeropad(int(time/60% 60), 2) & ":" & zeropad(int(time%60), 2)

    This one is for time, I didn't test it, I just copied it from above link, it did point me towards zeropad though.

    This will always result in 00:00 format.

    str(floor(TestVariable/1)) & "." & str(zeropad(round(TestVariable * 100)%100,2))

    I did test this one. It is for a number value that isn't time.

    This will always result in 0:00 format.

    If you need 00:00 or another combination then zeropad should be used.

    Round(), Zeropad(,) and Modulo

    https://www.scirra.com/manual/126/system-expressions

    https://www.scirra.com/manual/78/expressions

  • I only created text to see what UID was selected and how.

    I was sure of it just selecting 1 because of the way the event was set up.

    I wasn't sure if it was looking at more than one before selecting one though.

    I never tried to select 1 object with 4 of the same variable values.

    It has 4 to select from, I was curious on how it selected 1 of the 4.

    It seems it looks at UIDs from low to high and picks the first one that matches the condition.

    I was only wanting confirmation or told how if I were wrong.

  • I have 4 objects with an Instance Variable of the same value.

    Compare Instance Variable. ObjectID = "Enemy"

    Create Text Object.

    Set Text Object.UID

    To test it I have it creating text and setting it to UID.

    It always creates only one text object and it always has the lowest UID for that Instance Variable Value.

    It seems like it checks by UID and selects the first object that has the value, because it always selects the object with the lowest UID.

    I am not sure if it always works like this or is just coincidence.

    I currently have a 2nd variable that allows me to always select a specific object with a specific ObjectID Value.

    I would like to remove this variable if possible.

    I feel it isn't needed, but I don't want to run into errors later on.

  • I wouldn't do it, but I am not familiar with that process.

    C2 has fail-safes built in and is programmed to support many systems.

    You have to take into consideration what systems will be using it.

    Browsers in Fullscreen usually take up the whole screen, taking away some toolbars.

    If you change the resolution it may make browser toolbars come back.

    It may mess with browser in some other unknown way, because the browser was already expecting a set resolution.

    My point is this should be tested in a small way until you know more about it.

    If I were going to attempt that, I would do that in only 1 part of the game.

    This part of the game will stand out to the players.

    They will naturally give you good feed back if it is liked or bad feedback if it has errors or is disliked.

    Maybe do it once the level is finished or in pit stops or something.

    You don't want to do it in a very important part of the game if you are just testing it out. It may upset some people or make the game unplayable to some as a result.

  • Thanks, helpful as always.

  • It seems exactly what I need, but It is confusing a small bit to me. I will have to dissect it.

    I understand how to use it as it is, but would like to know a small bit more.

    Why are you setting r1 and r2 to random(1) instead of just setting it to 1?

    How is it picking a random point? The only random I see is random(1).

    I never used or seen a random without two limits. Random(0, 10) etc.

    Can you give a simple explanation for the rX and rY formula?

    I do notice that one controls the X and one controls the Y.

  • I have a large diamond shape that doesn't take up the whole screen, it does change size though.

    The diamond and image size is 2 parts width and 1 part height.

    100 width, 50 height

    1000 width , 500 height... etc

    What I currently have isn't using a hitbox. It works, but is a mess.

    Is it possible to spawn objects in a hitbox that isn't square?

    I suppose I could add hidden objects where I don't want it to spawn, but I usually try to avoid hidden objects.

Unconnected's avatar

Unconnected

Member since 6 Apr, 2016

Twitter
Unconnected has 1 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies