darkrealos's Forum Posts

  • can anyone help me pleasE?

  • https://postimg.org/image/vapsnoc5n

    can anyone tell me whats wrong with this code? when i debug the game

    Gamestate = False

    and WorldtimerActive = False

    yet the timer still goes up and ive check there is nothing else triggering the timer

    also i realised the 3rd and 4th code with WorldTime is hidden they are WorldTimerActive for 3rd and worldtimer for 4th

  • 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 reply and i never had random spawning, but i was thinking of trying UID to pinpoint, but i felt this was the wrong approach so i thought i would ask everyone before experimenting, im using families now and yeah your right they work a treat

  • i knew something simple was out there

  • okay, im gunna have about 15 plots which u can click

    once clicked it will bring up a menu off buildings

    you can click on a building and it will build it at the selected plot

  • hi there thanks for the reply, i did debate not using families but i thought that would require alot of coding and was wondering if i could make it easier but it seems i have to do it the long way

    thanks again for replying

  • hi there im trying to make a building system but im trying to make it universal and save tons of coding by using families. but im not sure how to use families to do what im trying i was debating using UID but im wondering if anyone can help

    so how it starts is ive got loads of building plots (all in 1 family)

    on family clicked i want the system to know what object was click while bringing up a menu off what to build, then on building clicked place that building where the selected building plot is.

    i was debating doing it on family clicked set variable to family.uid

    and then somehow construct building at uid.variable. the problem is i hear UID is very unreliable

  • oosyrag i worked out what you ment and it worked. i thank you kind sir .

    ok so i was wrong i got the next one working but now it doesnt count down both of the arrays just the first one thats added any ideas?

  • hey thanks alot for the replies. did i mention im new to arrays? but to explain the array better im trying to have the array have research names on x axis and the timer until its research on the x axis below it so y1. then the plan is when it hits 0 ill use if array contains 0 put cur x into another array with all research items. also im trying to do it in an odd way as you might be researching loads of different things at the same time with different times.

    p.s i dont usually bump but this problem has been giving me a headache all day

  • can anyone enlighten me please. i think the problem is with this code set value at (array.curx , 1) to array.curvalue - 1

  • hi there ive got a problem which is annoying lol.

    im new to arrays but i thought id start using them in my project as its important to learn arrays. so i started off with something simple which follows.

    on object clicked - push "Barracks" on x axis (((array)))

    set value at (array.curx , 1) to globalvarible * 120 (((360)))

    so this adds an array of Barracks,360

    which works out perfect, so the next bit of code i want to happen is every 1 second subtract 1 from the 360 until it reaches 0 so i used code

    for each x element

    every 1 second - set value at (array.curx , 1) to array.curvalue - 1

    timer = true

    the reason ive done the code like this is i plan to add several more items to the array each with its own timer in Y, so i constantly want it to subract 1 from each Y until it hits 0 but the code just sets the array to (barracks,barracks) so im not sure what im doing wrong. i hope this makes sense.

    im sorry havent provided a .capx file as its a secret project also a screenshot would be hard as the codes are all under seperate categorys on different pages which would mean alot of copy and pasting

  • hey ive been wondering this for ages, as games with loading in between layouts with a loader page for me feels more like a bigger more polished game. ive seen some examples but nothing seems good, need something more complete

  • thanks for the replies. i never knew objects could be made global. thanks alot that solved my problem

    quick question now the object is global it will show on each layout, other then setting invisible is there another way to hide the objects or is it because my layouts have same layers e.g. i use names instead of numbers. or is it gunna show regardless unless i set invisable

  • hi there thanks for replying. i would show it but its a project ive been working on for the last year so i dont really wanna reveal any of it sorry . if it helps ive done another debug creating 3 objects under the same family which is 3 individual objects but share same family. and when you change layout the go back all variables on those objects get reset back to 0.

    i read somewhere about making variables static but i havent been able to find that in family properties

  • hi there ive got a family which ive added variables to but when i change layouts the variables disappear, im not sure why the objects are presistant even tho when i debug it says object gets deleted and recreated. why is it doing this and is there a way around this? all my family has is about 8 variables per object

    Thanks for the help