Sami424's Forum Posts

  • I'm trying to get Construct to perform a calculation if a certain variable is set a certain way. But I cannot figure out how.

    The global variable cfcf can only be C or F. If it is C I want it to convert the value of OVTEMP (imagine OVTEMP is normally in fahrenheit) using the formula OVTEMP * 9 / 5 + 32 and then storing the new number in OVTEMP.

    It is impossible. I've tried a thousand different things and none work. I could even do this in BASIC in seconds but I cannot find the right way to talk to javascript to get it to do something so simple. Where am I going wrong?

    Picture from old post on how to set global variables in js

    So i guess you should try to use runtime.globalvars.YOURVARIABLE and then set it to your JS variable, example FOO

  • Hi,

    I want to make a calendar using date plugin, Problem I'm facing here is How do I get First & Last day of the current month. Somehow I'm able to get First day of the first week but how do I get last day of last week?

    When using date.getday(date.now) you will get the current day of the week, 0 = sunday so 0 is the last day of the week.

    EDIT: I noticed now that you ment first and last day of the MONTH, i will check it out and come back xD sry its early.

    EDIT AGAIN: So you could just add variables to make it easy, where you use date.getmonth(date.now) and get the current month ,0 - january, 11-decemeber

    Then do like if currentmonth = 0 then lastday = 31 , if currentmonth=1(feb) then lastday = 28

  • dop2000 i know you did something similar to this a few years ago, but your example is outdated and does not work anymore (updated c3).

    I have a halfworking barcode scanner atm using the libraries from above

    , but i cant make it so my text object sets the text to the information scanned from barcode.

    This would REALLY help me out since i own my own shop, any help appriciated.

    Ready to pay to get this working. In the meanwhile i will keep trying to make it work.

  • construct.net/en/forum/construct-3/how-do-i-8/set-bullet-angle-axis-166554

    I replied there to someone else, you prob should use zelevation to make bullet appear flying forward.

  • Bump. Is this something that is tricky for most other Construct 3 users? I've been afk with Construct 3 forums so with so much new 3D stuff, I can imagine like many others, 3D in Construct opens up a lot of new parameters that are just not easily relatable.

    I still know 2D fine and that's great, but there are some really exciting 3D things going on, but there's not a lot of comprehensive tutorials yet on how to work with the latest 3D camera and features.. new stuff coming faster than youtubers can produce comprehensive videos.

    I look at the demos and while they work and do things, it feels like there's a pretty big leap from knowing Construct 3 in 2D and reading the events these demos include and understand how the developer knew what values do what and how to make them behave in very specific ways.

    Add me on discord ironside#6435

    I have been working in 3d the past few weeks, we will try to figure it out :)

  • This looks like the same thing that was mentioned in this thread. The build service was already fixed yesterday and I just checked again and it still seems to be working fine now.

    Exported yesterday without problems so yes.

  • I need to save all instances of placeable objects in string, how i can do it? (I am making sandbox multiplayer game).

    Hmm... You could try adding all the information to an array, since that saves as a string, but you would need to save pos.x & pos.y of objects and other variables such as object type etc.

    Then use the create object at pos.x & pos.y (of the values in array)

  • I want to send the score to my own API along with the value of a session var $_username via a POST. Are there guides on the best way to do this?

    Thanks

    Best way is to use for example FIREBASE API or PLAYFAB, prob more out there and free but i only use the 2.

    You could do it using SQL POST & RECIEVE, not recommended however, but it depends on what security level your app/game needs.

    When you say your own API, is it your own? If its not to important what API your using, but you just want to store values in a database kind of way, then i strongly recommend firebase API.

  • how to generate numbers in ascending order in construct 2? ex: I'm making bet numbers, I can generate with array, but I would like them to be in ascending order, 1,2,3...

    Lordshiva1948 did a tutorial on this

    construct.net/en/tutorials/arrange-numbers-1009

    Array should work tho if 1 is at top and last number is at bottom.

  • I have a simple multiplayer app, just me as host and 1 person as peer. The system is just a bunch of images that we can drag´n drop. Its for clinical purposes.

    But 3 out of 4 peers connect to the room but the images dont load.

    Can it be a Anti-Virus problem ? A firewall problem ? But no firewall pop up in windows of the peers. Either no anti-virus alert.

    Is there a way to prevent this kind of conections error? Maybe using another paid server instead of scirra.com?

    Im kind lost.

    Dont think server has anything to do with it, depends on image sizes, are you using big images? if so what dimensions?

    Seems more like a loading error.

  • Is it possible to make a 3d ray cast or is this just not supported in Construct 3

    -Meepso

    Explain what you mean, 3d raycast should be possible using the 3d camera and 3d shapes, IF thats what you mean.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, I have a problem. I want create FPS and i dont know how set bullet angle for Y axis?

    thank for help :)

    This looks very awesome mate keep it up!

    For your issue, try to manipulate the z elevation of the bullet, so if you want it to fly forward it has to substract 1 from z elevation each tick or whatever speed the bullet is going.

    Quick example is creating a variable called bulletZ, add every tick set bullet sprite z elevation to bulletZ

    and then after that i would add like "every 0.2 sec > substract 1 from bulletZ".

    This would make the bullet appear flying forward.

    Then you will ofc have to implement your way of firing the bullet i just gave you an example that i think would work. Like add a function to shoot the bullet, check z elevation to destroy the bullet once its like -100 z ele

    Let me know how it works out, again, seems like a nice game :)

    P.S: If you worked with 3d shapes before, z elevation is way easier to understand.

  • I have a turret that on shoot should spawn cones, that shoot at the enemies. By default, when creating a new object at it's place, it is being created at the center of the turret.

    As you can see, this looks really dumb:

    I would want something like that:

    Therefore I need to shift the position of the cone to the edge of the "front" edge of the turret. (The edge it turns to the enemy.) I tried to do so with some Maths, but I failed badly (geometry isn't my strength after all). Is there a possibility to tell Construct to not spawn it in center, but rather at the edge of the other object?

    Like dop2000 said, click on the sprite and open the image editor and add a new imagepoint to the sprite, hold shift and click where you want it to be(holding shift will add a image point to all frames in the animation)

    After that you just PIN or CREATE the object on that imagepoint that you created.

  • Could He not do

    Object is on screen

    Trigger once

    Set animation 1

    Then invert it for when its not in The screen?

  • If you are comfortable with JavaScript, you should check out zxing-js, I'm guessing it wouldn't be too hard to use it inside C3.

    I will check this out! Thanks.