faggatron's Forum Posts

  • you'll want to test if the editbox = zeropad(computer.value('code'),4)

    its probably getting confused with strings and integers etc, adding the zeropad should sort things out.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Got it its working perfectly thanks alot only one thing tho, where would I put an event to make sure the number is above 999, i have the computers set to random(9999)

    You don't need to, basically thats what zeropad does

    if its <1000 say like 420

    then zeropad would make it 0420 so all it'll mean is the first digit is 0

  • Quick XAudio2 update - I've added more format support for XAudio2; a common problem with Directsound was that it only supported PCM WAVs. XAudio2 will support runtime decoding of ADPCM and xWMA WAVs. xWMA is a lightweight version of WMA specially supported by XAudio2. I'm also planning OGG support, but that will require fully decompressing the files in to memory first, but with today's computer memories, I don't think it's much important. For completeness, I'll throw in a Play MP3 action like Directsound had.

    wooo ogg support... good news!

  • I suppose you can use UID's but I usually find it easier, when placing loads of objects in the layout, to just set the initial values manually for each object. It's very easy to change, and very simple. It can get very confusing when using UID's to know what object goes with what in the layout editor.

    I made an example for you: http://www.quotecats.com/what/computercode.cap

    You know the objects with the same ID value go together. So if a computer has ID 1 it will go with boxes with ID 1. You set this in the layout editor, making it really easy to see what you're doing.

    Similarly you have to set the boxes initial digit value to determine which of the 4 digits you want. (It's probably possible with a little more tinkering to make the computer able to handle codes of arbitrary length, only if you need it though as it'd make it more complex.)

  • Surely you only need one for each loop there, are you using a compare in the system object instead of a compare private variable on the sprite?

    so you'd have:

    for each ship:

    Turret value 'UIDofparent' = Ships.UID

    did you try this?

    I made an example for you:

    http://www.quotecats.com/what/spaceshipturrets.cap

    It only uses one for each object loop to set the positions, so it'd be 600 iterations.

    EDIT: in fact when you make it create 600 ships its ultra laggy

  • Did you set it up like that screenshot above? I had it working.

    You also have to make sure the initial values are right:

    so if you have 2 computers and 8 boxes you'd have as initial values

    COMPUTER1: ID=0 Code=0

    BOX1: ID=0 Digit=1

    BOX2: ID=0 Digit=2

    BOX3: ID=0 Digit=3

    BOX4: ID=0 Digit=4

    COMPUTER2: ID=1 Code=0

    BOX5: ID=1 Digit=1

    BOX6: ID=1 Digit=2

    BOX7: ID=1 Digit=3

    BOX8: ID=1 Digit=4

    MORE COMPUTERS - just change the ID values.

    The initial digit value corresponds to which digit that box will display (ie Digit=1 means it will display 1st)

  • I really like the first idea, if it's possible.

  • I dont think you completely understand, the condition loop

    Pair: Loop each

    Would repeat the actions for each parent, and select the spaceships and turrets accordingly. So if you have 600 spaceships and 1200 turrets, it would loop 600 times, selecting the turrets for the one selected spaceship.

    I just mean so the pairer object would have all the expressions that a sprite does, but with a parameter for the other object.

    so if you have multiple instances of Sprite1 and Sprite2 paired with the pairer,

    when you have some instances of sprite1 picked in a condition, the expression " Pairer.X("Sprite2") " would give you the X of the sprite2.

    Much like if sprite1 and sprite2 were in a container if sprite1 was picked then sprite2.x would give the paired instance of sprite2's X.

  • oh the actual expression is "mid" not "middle"

    and you do need to set them from 1-4 not from 0-3

    Oh and, this is how you set it up for multiple instances using an ID value like I was saying, just make sure the initial ID values of the boxes are the same as the matching computer ID value.

    <img src="http://www.quotecats.com/what/ComputarID.PNG">

  • Make some value on the computer - say "code"

    start of level -> set code to random(10000)

    Give the boxes another value "digit" which will be the digit they show when opened

    set each box's initial value digit value to numbers from 0 to 3, each with a unique value, (The effect of this is that the 0 box will show the 1st digit, the 1 will show the 2nd etc)

    add a sub-event to the start of level event:

    for each box -> set digit to middle(zeropad(computer.value('code'),4),'digit',1)

    EDIT: (actually this for each box might not be necessary, can probably just put the action in the start of level event)

    You may have to set the initial values to 1 to 4, I dunno if 0 or 1 in that parameter of the middle expression gives the first digit. Try this if it doesn't work.

    This is also assuming you're only having one of these doors, would be more complex with multiple ones, but doable by adding another value to the boxes and setting them to the computers UID (or a corresponding extra value on the computer. EDIT: or indeed with containers but then you'd have to make different objects for each box and use a family for the stuff above, which is a bit messier).

    When you need to display the digits, the value you need is 'digit', the value to test if its correct is computer's 'code' value.

  • Pairer plugin sounds really useful, would be cool if as well as loop each pair you could also have

    always: set turret X to pairer.X("sprite420")

    would always set turret X to the paired instance of sprite420's X

  • Ah ok, like supreme commander.

  • What's this about multi-monitor support? you think you'll keep trying to make it work? I use 2 monitors so this would be incredibly cool.

    What sort of thing was it? like layout editor on one screen and events on the other?

  • if you tick the destroy on start up attribute instead does it still happen?

  • I think the third is the most promising, a lot more original than the others. Guiding him through a maze could be potentially be a really fun (and probably quite difficult) puzzle game, then you could add bosses or whatever where you have to slam him into them at high speed, I dunno I think you could take that one a lot further than the others.