tulamide's Recent Forum Activity

  • Indeed, the size seems to be clamped somehow. On my 1920x1080-display I tried with 2400x1100 and got 1924x1058

    All windows are childs of the desktop, but I'm not sure what causes this. The height could be a clamp to (desktop height - taskbar height), but it's wild guessing. Also, why then 1924 for the width? It is also in the current window object for the next build. I will have a look at it.

  • I'm interested in what the final name of this new system might be. I'd imagine since they claim it's going to be a system more built for the hardcore market, they wouldn't use the name "Wii" this time around.

    Are you sure? Because, I'd bet it will be

    Wii Tuu

  • A sound channel does not reset its position automatically. You have to stop it playing and reset its position manually. So do what zyblade wrote with the change that you set the position to zero prior to playing the channel.

    + On collision between Ball and Brick

    -> XAudio2: Set Channel 1 Position to 0 seconds

    -> XAudio2: Play Channel 1

    Edit: I'm sorry, you also have to add this line to your event sheet:

    + XAudio2: [negated] Channel 1 is playing

    -> XAudio2: Stop channel 1

  • A string is a string of characters and a character is not just letters or numbers or special characters like comma or quotation mark. The plain ASCII set Construct works with also contains non-printing control chars like backspace or carriage return (http://www.asciitable.com/). You won't see those chars although they are in the string and therefore count if you use a function like 'find'.

    Why do I tell that? Well, the 'find' expression works correctly. find("a,b,c,d,e", "a") will return 1. If you encounter something else, then your source string does contain a char before the assumed first char. If you load the string from a file, make sure there is no cr or tab or another of those control chars before the first printing char. Sometimes a space is also overseen.

    p.s. the first index is 1. If the substring couldn't be found in string, zero is returned.

  • It depends on the details. For the specific example, there's

    Find(source, string [, start])

    It doesn't care about delimiters, but that would not be needed for it anyway.

    So, a call to

    + Find(Global('TextVariable'), "a") > 0

    -> do stuff if a is in text

    will return the first index of occurance or 0

  • To your first issue: The 'Else'-event is not working. This is because it is a subevent of for each. 'Else' needs to be on the same level than the event you want to branch. That means, the targets never get cleared, just new targets added. You can't work with 'else' here. I would show you an alternative, but I am not sure, under what condition exactly you want to clear the targets.

    To the second issue: Creating an object puts it on the SOL, instead of

    Set "family" "health" to 100

    just do

    Set object('health') to 100

    and the correct object will automatically be used. If the object is a sprite, then you're out of luck. Sprites are created at the end of a tick, you can't access a pv until the next tick. One way would be to store Sprite.OID or UID in a variable after having created it and do a check for that variable holding a value before that variable was filled with OID or UID. If it contains a value, select the object based on the OID or UID and set its pv. Just make sure those events are all placed before creating the object and storing its OID. The variable may be a pv or a global, but it must not be a pv of the newly created object.

  • I've made 3 simple changes to toralord's "Braid type warp"-demo and you now have a slow motion replay. I wouldn't recommend doing it this way in a full game (vectorizing the movements/angles would be the better approach), but as a tech demo it shows that it is relatively easy to get something working.

    The changes:

    Instead of inserting at index 0 in event 4, it is inserting at "end", which makes the reverse order a normal order again.

    Instead of replaying on every tick, every x milliseconds is used with this formula

    1000 / (1 / TimeDelta) * 3[/code:fvlmo5f4]
    This corresponds to the third change: As soon as the replay key is pressed, the timescale ist set to 1/3. This keeps the animations and movements smooth.
    
    Just change both values at the same time if you want another replay speed. For example, to play at 25% speed, set
    every x ms to [i]1000 / (1 / TimeDelta) * 4[/i]
    and timescale to [i]1 / 4[/i]
    
    [url=http://www.mediafire.com/file/xlfwn96d9j80d0a/Braid%20test%20slomo%20replay.cap]Braid test slomo replay.cap[/url]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you set the index to 5 in Construct's array you will get the content of the 5th cell of the array. This is not neccessarily the same value! For example:

    +Always

    -> Array: Set index 2 to Array(2) + 1

    -> Text: Set text to Array(2)

    Will show you an increasing number, it's a different value on every tick. That's because we change the content of that cell on every tick.

    The way s is used here is different to what you already know of an array. But first an important point: If you select s.n({"warpX",5}) you will get the 6th variable, not the 5th. That's because s is zero-based, s.n({"warpX",0}) is the first element, s.n({"warpX",1}) is the second element, etc.

    The arrays of s are dynamic arrays. You can add, delete and insert to an array of s at any time to any position. You don't need to take care about resizing, this is done automatically by s. The trick in that Braid-cap is that on every tick a new array cell is inserted before the first one and all others are shifted to the right. So after this insertion, the value that used to be s.n({"warpX",0}) is now located at s.n({"warpX",1}), and s.n({"warpX",0}) is a new cell with a new value. That's not changing the values, just relocating them. That's because they are dynamic, opposed to the rather static arrays of Construct.

    I hope it explained it a bit

    p.s. sure, if you still have problems with the logic, just pm me, I'm glad to answer in german

  • It seems that you took my words literally. My bad. I wanted to stress the problem and left out what was already right. So, here the complex answer:

    1) To access a number array in 's', you use s.n({"name of your array"})

    2) To access an index in an array, you set the index after the array name: {"name of your array", 2}

    3) Both combined results in: s.n({"name of your array", 2})

    And in your example, it is:

    s.n({"warpX", 0})[/code:dqcd3bn8]
    
    Really, you should first go through the tutorials from the link above. 's' isn't the easiest to use plugin
  • The wiki will answer this: http://sourceforge.net/apps/mediawiki/c ... xpressions

    (scroll down to the category "Text" and look for left, right and mid)

    The wiki is always a good starting point. Many of the various ACE are explained there

  • see the difference between what I wrote and what you wrote?

    1) {"Opponent", "Ant", 4, "Inventory", 2}

    2) {"warpX,0"}

    It is important to set the double quotes right. Just correct 2) to:

    {"warpX", 0}

    and it will work. Never set the index within the array name, but as a seperate field after the array name as a comma seperated entry. (it is explained in the tutotials from lucid in the thread link above, too )

  • A simple switch will help here. Create a pv/global "pausing". Set it to 1 if the game is paused and back to zero if the game continues.

    Make a condition

    + global('pausing') equal to 0

    -> ... game stuff

    + else

    -> ... pause stuff

    and place all of the game related events as subevents of the first branch and all of the pause related events as subevents of the else-branch.

tulamide's avatar

tulamide

Member since 11 Sep, 2009

Twitter
tulamide has 3 followers

Trophy Case

  • 15-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

17/44
How to earn trophies