XHXIAIEIN's Recent Forum Activity

  • I make a quick example to demonstrate the use of For-each.

    You will observe that the "red box" all have the same angle.

    When you operate directly on the multiple instance object, you don't need to use For-each.

    Sprite: Set Angle to random(360)

    But if you want to use function/action for multiple instance, you need to use For-each.

    If not, although each object will be executed function, but the results of their execution are the same.

    Sprite: Call Function RotateAction(random(360))

    So, you need to use a For-each to make each sprite to rotate a different Angle.

    For Each Sprite → Call Function RotateAction(random(360))

  • You can try this:

    runtime.callFunction(...localVars["command"]
    .split(",").map(e => e.trim())
    .map(e => (isNaN(e) ? e : Number(e))));

    Add it to a Function and call it with a string parameter.

    {"is-c3-clipboard-data":true,"type":"events","items":[{"functionName":"Call","functionDescription":"","functionCategory":"","functionReturnType":"none","functionCopyPicked":false,"functionIsAsync":false,"functionParameters":[{"name":"command","type":"string","initialValue":"","comment":""}],"eventType":"function-block","conditions":[],"actions":[{"type":"script","script":"runtime.callFunction(...localVars[\"command\"]\n.split(\",\").map(e => e.trim())\n.map(e => (isNaN(e) ? e : Number(e))));"}]}]}
  • Just sharing some of my weird ideas recently:

    When I made event triggers, I made some modular objects and check whether it has a specific child object to gave them specific functions and.

    For example, when I needed this event to show a dialogue, I added the dialogue icon to the trigger.

    The green blocks as triggers, they are all the same, And they don't have any instance variables. when player collision or overlapping trigger, check the trigger's hierarchy to see if a specific child object exists.

    In each child icon, there are instance variables that determine what events they will trigger.

    Some of the instructions are:

    • trigger when entering the area
    • Press the interaction key to trigger when overlapping the area
    • Hide after triggering(Destroy but reset at next time when enter the Layout)
    • Permanently remove from current game(Destroy + Persistent & Local Storage)
    • Send signal when trigger

    ~~~

    These icons are from: game-icons.net

  • Try using 'On any touch end' or 'On any touch start' instead of 'On tap' here.

  • I noticed someone posted this example, but it was based on NW.js. Can WebView2 export "transparent background" and "borderless" application modes? Ashley

    Why do we need it?

    This feature allow to make a "desktop ranch" and "desktop pendants" games, like:

    Of course, I know this may be a very difficult work, because that may also warrant attention Technical points:

    1. Borderless windows

    2. Always on top

    3. Allow click-through

    4. Allow background running

    5. Allows movement between different monitors

    6. Notification requested

  • In the for-loop event, we can use wait 0.1 * loopindex seconds to wait for 0.1 second in each loop.

    However, when I try to use loopindex at the same time, it is reset to 0. it is not a static variable in this scope.

    The result is failure:

    The current solution is to add a static variable to record it. But I think this is very troublesome.

    I'm wondering if there is a more elegant way to do it?

  • You can do this using a Tween behavior and playing a 0 - 1 animation using the Tween Value.

    Here is an example: download

  • When I think of Egyptian games, the first thing that comes to my mind is Senet, a very ancient tabletop game. Some people say that Senet is the world's first board game.

    I recall seeing some video games before. I don't know if it has anything to do with egyptian, but I think they may have some very similar aesthetics.

    Chants of Sennaar

    store.steampowered.com/app/1931770

    Heaven's Vault

    store.steampowered.com/app/774201

    Egypt: Old Kingdom

    store.steampowered.com/app/646500

    Lost in Art: a Miniature Realm

    store.steampowered.com/app/2900050

    Apotheon

    (Ancient Greek Mythology)

    store.steampowered.com/app/208750

    Assassin's Creed Origins

    store.steampowered.com/app/582160

    (Wait! also thinking of Temple Run, Zuma, Yu-Gi-Oh! )

  • {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-any-touch-start","objectClass":"Touch"}],"actions":[{"id":"create-object","objectClass":"System","parameters":{"object-to-create":"DrawingCanvas","layer":"0","x":"Piggy.X","y":"Piggy.Y","create-hierarchy":false,"template-name":"\"\""}},{"id":"set-size","objectClass":"DrawingCanvas","parameters":{"width":"Piggy.Width","height":"Piggy.Height"}},{"id":"paste-object","objectClass":"DrawingCanvas","parameters":{"object":"Piggy","effects":"with-effects"}},{"id":"tween-one-property","objectClass":"DrawingCanvas","behaviorType":"Tween","parameters":{"tags":"\"FadeOut\"","property":"offsetOpacity","end-value":"0","time":"0.3","ease":"easeinoutsine","destroy-on-complete":"yes","loop":"no","ping-pong":"no","repeat-count":"1"}},{"id":"set-animation-frame","objectClass":"Piggy","parameters":{"frame-number":"Self.AnimationFrame+1\n"}}]}]}
    
  • You need to use the LocalStorage

    /#open=localstorage-hiscore

    /#open=level-selection

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are mixing up the order of the two things you are about to do. You may want to first check if the corresponding userID and password exist in userArray, and if true, stop loop and use localStorage to check the item for this user.

    你可以加QQ群 180911504

  • You need to wait for Check userID to complete asynchronously before use userArray Load data. Just like you add the LocalStorage callback condition below. But you have already done this because you use another array object user_data below. And you don't have any information about AJAX here, so you may have written it wrong.

    And, the user_check function, This loop Array condition, you may need to use it as a sub-condition.

    I don't quite understand whether the two array objects user_data and userArray are the same thing, But what you want to load from LocalStorage is already in the user_data array object.

    中文版回答:

    LocalStorage 是一个异步动作,你需要等待异步完成才能得到请求的数据。不能直接挨着写 userArray 读取数据。要像下面一样: 先检查是否存在,如果存在再获取数据,获取到了再读取。

    不过,你已经是知道了要这么做的,因为你已经在 On item userID get 里面,用另一个数组 user_data Load 到了本地数据。本地数据都在这里面。

    我不是很理解 user_data 和 userArray 这 2 个数组对象是否是相同的东西,但如果你希望从 LocalStorage 中读取存档,再进行遍历数据,你需要将上面的 userArray 的 Load 动作,也放到下面的 On item get 里面。

    或者在中间夹一个 "等待前面异步完成" 动作,然后继续用 userArray 读取数据。然后添加一个子条件,把开头系统循环的事件放在子条件继续执行

XHXIAIEIN's avatar

XHXIAIEIN

Member since 26 Mar, 2016

Twitter
XHXIAIEIN has 14 followers

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x47
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x11
    Lightning Draw First person to up-vote a new Construct 3 release
  • x10
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

21/44
How to earn trophies