cantek's Forum Posts

  • Ah, yea. I checked my conditions line by line at the end and there was one function taking effect before I try to get the params and it was setting them to default. So yea actually on start of layout works if you do not reset your values earlier Thanks guys.

  • Hi,

    Yea it did not give me what I need as I mentioned in my first post. It is being triggered only once in the game load. Then on the layout changes which are done by Go To Layout function does not enter in that function.

    Thanks

    Cheers

  • Ok let me make it more clear.

    I need to check a parameter on every layout load. What I have is only for the first load of the game it self but not for the successfull load after ''Go to layout' function called.

    I need to find a way to check the variable on every new level layout load complete to set some objects or remove them depending on the parameter which can be set on the previous layout.

    I am not sure if this is more clear but this is exactly what I need to do

    Cheers

  • Hello guys,

    I am trying to find a way to catch the layoutloaded kind of an event for the new layouts that I am loading in game for different levels.

    I need to check some global variables on every new layout load.

    How can I do that? I already tried 'on start of layout' system event but got nothing from that.

    Cheers

  • Ok I am taking back the 139 related one. I was not aware of the function object is something you can add only once.

    It is clear now. But still the project I developed on 139 release is not working properly on 178 release. Especially changing the directions are not.

  • I seee. Thanks people. Obviously I was expecting it differently. Its good to learn.

    Cheers

  • So you say that I need to use only one instance or you say It is limited to only one instance in a project?

    Attached the screenshots of what I see.

  • Hi guys,

    As I said, I was using it before and there are still instances of function object in my project and with the 139 release they work, but I can not add any new function instances since the function object is not in the object list that you see when you click on Insert new Object.

    With the release 178 the current function instances are not working at all and also can not add any new ones.

    Since the project is huge and I beleive pretty good it is better if I do not send the capx. But I am readz to follow your suggestions.

    Cheers

  • I also created a bug report. Is it only me who is having this annoying problem?

  • Problem Description

    Function object is not in the object list anymore!

    Attach a Capx

    Capx is attached now. I tested it again on an other project and I saw that function is in the list.

    Description of Capx

    Games, with sprites and timers.

    Steps to Reproduce Bug

    • Open the project in Construct 2
    • Right click on layout or in objects list and click on add new object
    • Look for function object - There is none.

    Observed Result

    In the latest version none of those functions take effect.

    In the previous version they take effect but I can not add any new ones since I can not see it in the list.

    Expected Result

    To see the function object in the object list and also use it properly in the new version.

    Affected Browsers

      Not a browser problem

    Operating System and Service Pack

    Windows 7 SP 1

    Construct 2 Version ID

    Construct 2 release 139 (64-bit) There is no Function in the list but existing ones works.

    Construct 2 release 178 (64-bit) There is no Function in the list and existing ones dont work.

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • And also the same thing happens on the newest version. It does not even see the functions written on the previous version. I have the problem on both versions obviously.

  • Hello,

    I used this before and I have like 5 functions already but I can not find the Function object in the object list anymore. It was under general tab before but there is nothing called function in the whole object list.

    How can that be possible and how can I solve this?

    Cheers

  • OK,

    I did it.

    The motion and so on are useless if you do not know what is the angle exactly. So I calculated the angle of the current Sprite and used it to set the motion angle of the bullet.

    set motion angle -> black2.AnimationFrame * 22.5

    This solved the problem, ofcourse if you are starting from the 0 and if your gun is looking to 0 degrees.

    Cheers

  • I attached the code I have and the screenshot of what is happening. Maybe it can explain better.

  • Lets say, there ıs the rocket launcher, whıch ıs stupıd and just turning around, I want it to fire on the side, direction that it looks at that moment.

    I am not sure what to understand from your suggestion. I already tried to set the angle of the bullet as launcher.angel , It did not work. Bullet always goes to same direction no matter the direction of the launcher.

    Cheers