XHXIAIEIN's Recent Forum Activity

  • you can check this:

    cdn.discordapp.com/attachments/225550155531812865/966974946746191932/RegexMatchVariable.c3p

    ---

    Sorry, English is not my native language, but you can roughly understand the idea from here:

    ( need 'Dictionary' object type)

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"variable","name":"REGEX_VARIABLE","type":"string","initialValue":"\\{(\\S+)\\}","comment":"{gold}","isStatic":true,"isConstant":true},{"functionName":"ParseFormat","functionDescription":"","functionCategory":"","functionReturnType":"string","functionIsAsync":false,"functionParameters":[{"name":"source","type":"string","initialValue":"","comment":""}],"eventType":"function-block","conditions":[],"actions":[],"children":[{"eventType":"variable","name":"parseText","type":"string","initialValue":"","comment":"","isStatic":false,"isConstant":false},{"eventType":"block","conditions":[{"id":"test-regex","objectClass":"System","parameters":{"string":"source","regex":"REGEX_VARIABLE","flags":"\"\""}}],"actions":[{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"parseText","value":"source"}}],"children":[{"eventType":"block","conditions":[{"id":"for","objectClass":"System","parameters":{"name":"\"\"","start-index":"0","end-index":"RegexMatchCount(source, REGEX_VARIABLE, \"g\") - 1"}}],"actions":[],"children":[{"eventType":"variable","name":"MatchKey","type":"string","initialValue":"","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"MatchValue","type":"string","initialValue":"","comment":"","isStatic":false,"isConstant":false},{"eventType":"block","conditions":[],"actions":[{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"MatchKey","value":"RegexMatchAt(source, REGEX_VARIABLE, \"g\", loopindex)"}},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"MatchValue","value":"Dictionary.Get(mid(MatchKey, 1, len(MatchKey)-2))"}},{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"parseText","value":"RegexReplace(ParseText, REGEX_VARIABLE, \"\", MatchValue)"}}]}]},{"eventType":"block","conditions":[],"actions":[{"id":"set-function-return-value","objectClass":"Functions","parameters":{"value":"parseText"}}]}]},{"eventType":"block","conditions":[{"id":"else","objectClass":"System"}],"actions":[{"id":"set-function-return-value","objectClass":"Functions","parameters":{"value":"source"}}]}]}]}
    

    ---

    It uses regular expressions to match.

    	Hi, {name}! You Have {gold} G!
    

    Use RegexMatchCount to find how many variables need to be replaced in this string. it is 2

    	RegexMatchCount(source, "\{(\S+)\}", "g")
    

    and then use a loop to through it. 0 ~ 1

    	For "" from 0 to RegexMatchCount(source, REGEX_VARIABLE, "g") - 1
    

    and then Use RegexMatchAt to replace the variable. it is '{name}' and '{gold}'.

    	MatchKey = RegexMatchAt(source, REGEX_VARIABLE, "g", loopindex)
    

    and then Use mid(text, index, count) extract content.

    	mid(MatchKey , 1, len(MatchKey)-2)
    
    	MatchValue = Dictionary.Get(mid(MatchKey, 1, len(MatchKey)-2))
    

    and then Use RegexReplace to replace the Dictionary value.

  • It is recommended to collect the games currently available on Steam and display them on the Showcase page. This helps us to know how a game made with Construct works and what it can be.

    TomAshleyLaura_D

    image Game Developer Link
    There Is No Game Draw Me A Pixel https://store.steampowered.com/app/1241700
    The Next Penelope Aurelien Regard https://store.steampowered.com/app/332250
    Klang Tinimations https://store.steampowered.com/app/412660
    Klang 2 Tinimations https://store.steampowered.com/app/1111600
    Mighty Goose Blastmode https://store.steampowered.com/app/1299360
    Astral Ascent Hibernian Workshop https://store.steampowered.com/app/1280930
    Gardener's Path Viridino Studios https://store.steampowered.com/app/1775750
    Creature Keeper Fervir Games https://store.steampowered.com/app/1826710
    Voyage Venturous https://store.steampowered.com/app/1051950
    10mg: Sealed Estate Salman Shurie https://store.steampowered.com/app/1435480
    Story Arcana Cyomo https://store.steampowered.com/app/1374920
    Creature Keeper Fervir Games https://store.steampowered.com/app/1826710
    qomp Stuffed Wombat https://store.steampowered.com/app/1066900
    10mg: Always Down Stuffed Wombat https://store.steampowered.com/app/1101800
    Gutwhale Stuffed Wombat https://store.steampowered.com/app/1267810
    Nongunz: Doppelganger Edition Brainwash Gang https://store.steampowered.com/app/1304780
    Un_Pas_Fragile Un Pas Fragile Team https://store.steampowered.com/app/1093520
    RunningDead PotionC https://store.steampowered.com/app/1008830
    Sun Wukong VS Robot Bitca https://store.steampowered.com/app/584220
    Blind Blade II Aven https://store.steampowered.com/app/1273290
    Montaro JCKSLAP https://store.steampowered.com/app/495890
    Duck Souls Viridino Studios https://store.steampowered.com/app/917290
    Rabisco Viridino Studios https://store.steampowered.com/app/1125860
    Pinkman Viridino Studios https://store.steampowered.com/app/516480
    Hypnospace Outlaw Tendershoot https://store.steampowered.com/app/844590
    Puppy Cross DIMANCHE CORP. https://store.steampowered.com/app/1183500
    Sheepy: A Short Adventure MrSuicideSheep https://store.steampowered.com/app/1568400
    Honey Rose: Underdog Fighter Extraordinaire Pehesse https://store.steampowered.com/app/523680
    Rhythmy InsaneHawk https://store.steampowered.com/app/1001970
    Brute MGFM https://store.steampowered.com/app/451630
    Indecision Bilge Kaan https://store.steampowered.com/app/720030
    Terry Poorflyer lukaszkups.net https://store.steampowered.com/app/1935130/Terry_Poorflyer/
    stikir Bilge Kaan https://store.steampowered.com/app/952200
    Joel Mayer's Purgatory Joel Mayer Productions https://store.steampowered.com/app/1137480
    Buissons Tambouille https://store.steampowered.com/app/1151930
    Flat Trip Dmitriy Mamaev https://store.steampowered.com/app/918740
    Universe For Sale Tmesis Studio https://store.steampowered.com/app/1627840/

    Of course, there are many more, I'm sure Laura_D can add more, and also there are also many on itch.

    Author website
    Stuffed Wombat https://stuffedwombat.itch.io
    LootBndt https://lootbndt.itch.io/
    Over boy https://overboy.itch.io/
    Vimlark https://vimlark.itch.io/
    MGFM https://mgfm.itch.io/
    Salman_Shh https://salmanshh.itch.io/
    TackerTacker https://tackertacker.itch.io/
    Piranha305 https://piranha305.itch.io/
    FoozleCC https://foozlecc.itch.io/
    Shawn Bowers! https://shawnbowers.itch.io/
    niceden https://nicedengames.itch.io/
    Shepherd Games https://shepherdgames.itch.io/
    Roberto Romao https://roberto-romao.itch.io/
    Ludipe https://ludipe.itch.io/
    FobTi interactive https://fobti.itch.io/
    Samuele Sciacca https://samuelesciacca.itch.io/
  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • I try to display a simple UI using html-element. It's from here (https://codepen.io/kathykato/pen/MoZJom), but I don't know how to make the js to work. can't seem to access dom.

    c3p:

    cdn.discordapp.com/attachments/253490735268102144/956033501193470012/ask-html-element.c3p

    Tagged:

  • You do not have permission to view this post

  • Thank you R0J0hound ! I made it based on the file you provided, it could be more suitable for the way I work.

    Update:

    I made this template:

    Markdown_Dialogue_System

    cdn.discordapp.com/attachments/225550155531812865/989114414433194005/Markdown_Dialogue_System_v1.0.c3p

    Example

    Choice Branch

    #test
    Mia : Hello.
    Amy : Have you visited our company before?
    Mia : Yes, I was here two years ago.
    Amy : Would you like tea or coffee?
    (...100)
    [Tea](#test-tea)
    [Coffee](#test-coffee)
    
    #test-coffee
    Mia : Coffee, please. With milk.
    Amy: I am afraid we haven't got any milk. I'm very sorry.
    Mia: It doesn't matter.
    
    #test-tea
    Mia : Tea, please.
    Amy: Okay.
    

    Variable in String

    Mia: Hey, {name}. What are you doing?
    

    Condition in String

    #buy-fruit
    guy : Hi, {if gold >= 1000 ? "Rich Man!" : "{name}."} You have {gold} coin. {if gold >= 10 ? "Do you want to buy {if gold > 25 ? fruit1 : fruit2}?" }
    

    Call Function in String

    #show-me-the-money
    Starcraft:S\.H\.O\.W\.\.M\.E\.\.T\.H\.E\.\.M\.O\.N\.K\.~E\.Y\.
    callFunction("AddData, gold, 1000")
    
    
    :===========================================================
    : ■ CheatSheet
    :===========================================================
    : ○ Guide in Section
    : ----------------------------------------------------------
    : text name : text
    : choice [This is a choice.](#scenes)
    : wait (...300)
    : goto (#section)
    : function callFunction("ShakeScreen, 1, 0.25")
    : ----------------------------------------------------------
    : ○ Escapes in "Text" - "This is a *string* and {variable}."
    : ----------------------------------------------------------
    : variable {string}
    : bold *text*
    : delete text~~~~
    : newline \n
    : wait for 50 ms \.
    : wait for 250 ms \-
    : wait for 1,000 ms				\|
    : display directly $text$
    : ----------------------------------------------------------
    : ○ Branch in Text - {if condition ? True : False} 
    : ----------------------------------------------------------
    : condition | < | <= | > | >= | = | == | <> | != |
    : branch | number | variable | "string" | "This is a string and {variable}." | 
    : ..........................................................
    : branch only True {if condition ? True}
    : branch True & False {if condition ? True : False}
    : ..........................................................
    : compare number {if money >= 2000 ? "Rich Man!" : username}
    : compare variable {if condition != variable ? "text1" : "text2"}
    : compare "text" {if weather = "Cloudy" ? "It looks like rain."}
    : ----------------------------------------------------------
    : Note: Use `callfunction` set variable to make more branches.
    : Note: All variables from dictionary. equal to `dictionary.Get(variable)`
    :===========================================================
    

    -------------------------------

    (old)

    :=====================================================
    : ■ CheatSheet
    :=====================================================
    : message name : text
    : choice [This is a choice.](#section)
    : wait (...300)
    : goto (#section)
    : -----------------------------------------------------
    : newline \n
    : wait for 1/4 second \.
    : wait for 1 second \|
    : display directly $text$
    : bold *text*
    : -----------------------------------------------------
    
    #start
    a : Hello.
    (...500) 
    b : Once upon a time\..\..\..
    [There were two choices.](#next)
    [There were four lines of content.](#next)
    
    #next
    b : They lived happily ever after.
    [End.](#start)
    
  • You do not have permission to view this post

XHXIAIEIN's avatar

XHXIAIEIN

Member since 26 Mar, 2016

Twitter
XHXIAIEIN has 10 followers

Trophy Case

  • 8-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
  • x46
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x10
    Lightning Draw First person to up-vote a new Construct 3 release
  • x9
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

20/44
How to earn trophies