R0J0hound's Recent Forum Activity

  • If the arrays are one dimensional (ex: with size (n, 1,1)) then you could do this:

    start of layout

    gamearray: load from json string Array1.AsJSON

    ---- array2: for each x element

    ----> gamearray: push back array2.curvalue on x axis

  • Phealin

    It's very doable, and a sort isn't needed.

    You can use "repeat" or "for" to loop over the letters.

    Use the len() expression to set the length of the loop, then the mid() expression to get the individual letters.

    Next you need to convert the letters to a number. You could do it the long way by making an event for each, or you could use the find() expression [expained below].

    Wrapping the value around when adding a number can be do by using the % operator.

    Finally converting the number back to a letter can be done with mid() in a similar way to using find().

    As an example the following should encode your text.

    Global text input="hello"

    Global text output=""

    Start of layout

    set array size to (7,1,1)

    set array at 0 to 6

    ...

    set array at 6 to 2

    Global text letter=""

    Global number value=0

    Start of layout

    Repeat len(input) times

    set letter to mid(input, loopindex, 1)

    set value to find("abcdefghijklmnopqrstuvwxyz", letter)

    set value to (value+array.at(loopindex%array.width))%26

    add mid("abcdefghijklmnopqrstuvwxyz", value, 1) to output

    That works any input that consists of only lowercase letters.

  • zenox98

    That's the one. That's no good if it's not connected to the reporting system.

  • It's just an annoyance really. In order to report a game you have to open it, and as a result you get logged as a recent player.

    Anyways the arcade looks to be in need of more moderation, merely by seeing the new game's thumbnails/title.

  • I still don't see why a layer couldn't be used instead of the imagepoints. Creating/destroying the objects as you switch tabs won't really save you any memory, although I do see the value of destroying it instead of hiding it since you wouldn't have to check if the objects are on a visible layer before interacting with them.

    They way I see it imagepoints could be useful perhaps if those widows are moved around. Still I'd probably opt for using the pin behavior or storing the xy offsets in a variable. Also it's much quicker to just position stuff in the editor than to tweak imagepoints. If I wanted to create/destroy the windows i'd use a array to store the object types,sizes,frame,text,and position at the start of the layout, then just loop through that when I wanted to recreate it.

    For organizing object types I'd actually opt to use less object types and instead use variables and animation frames to distinguish them. Of course this largely depends on what I'm doing.

  • This should do it:

    Every tick:

    ---- set text to min(float(self.text)+100*dt, score)

    But personally I'd use a second global var that increases toward the score. Then I'd just show a rounded number.

    global number display=0

    Every tick:

    ---- set display to min(display+100*dt, score)

    ---- set text to int(display)

  • derekandes

    I'm not sure why and invisible Sprite would paste when pasting a layer. The fix was for the normal paste action. I'll have look into it when I get a chance.

    Tilemaps won't paste at all unless you set webgl to off in the project properties.

  • I usually just wing it and test as I go. Unless of course I have an specific design I'm after, then I do a rough scetch on paper.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First look at the sdk manual:

    https://www.scirra.com/manual/15/sdk

    Next you could look around at the js files in c2's exporters/html5 folder. Quad is defined in one of the files with common in the name.

  • I haven't looked at your capx but if the two buttons are instances of the same type, then you could give them an instance variable, call it value and set one to 1 and the other 2. Finally when you click on it add button.value.

  • Does it not work?

  • That file contains the c2 runtime and all the plugins you use in your project. There really isn't anything you can cut. Maybe removing all the comments in it could save some space, but you'd have to find a tool for that.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound