Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeOct 2nd 2010 edited
     
    This is for your custom functions. Here's mine:



    This shows you the direction where you are going.

    In English: it converts x and y to angle.-----------------
    • CommentAuthorgriz
    • CommentTimeOct 2nd 2010
     
    actually, it doesn't show 'velocity' ...
    just direction.
    velocity is both direction and speed.
    you could do that by varying the length
    of your dial.

    but ... interesting idea.
    i'm sure it will be instructive to see how
    your code does it.-----------------
    Random numbers are far too important to be left to chance.
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeOct 2nd 2010 edited
     
    Thanks griz. I'll fix the name.
    I actually didnt get how to make this myself. I saw how people made mouse-following cannons and things like that. Then I suddenly just got that "Hey! What about if I get velocity of a ball and make the stick have the same angle?" and so I made it easily.

    I only wonder can it be used somehow.-----------------
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeOct 2nd 2010 edited
     



    This has been made before but this time I made it all myself and my own way.

    EDIT: Brothers weight bug fixed-----------------
    •  
      CommentAuthorUnihedron
    • CommentTimeOct 3rd 2010
     
    we couldn't drag the static.-----------------
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeOct 3rd 2010
     
    We are not supposed to do that. Of course, I can fix it...-----------------
    •  
      CommentAuthorTheDudeFromCI (Advanced Member)
    • CommentTimeOct 3rd 2010
     
    Nice, it works for rectangles too!-----------------
    Orange is my favorite number.
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeOct 3rd 2010 edited
     
    Yes, the power of the drag depends of brothers mass. So you can move any kind of a movable shape with it.
    And the meter sure works also with every movable.




    And then the best one: both functions.


    -----------------
    •  
      CommentAuthorMadball (Advanced Member)
    • CommentTimeOct 9th 2010 edited
     
    •  
      CommentAuthorMadball (Advanced Member)
    • CommentTimeOct 12th 2010
     


    -----------------
    LD35!
    • CommentAuthorXyuzhg (Moderator)
    • CommentTimeNov 15th 2010 edited
     
    Sorry, this thread has been inactive for a while. Sticky request, this can be a very useful thread.

    I actually can't believe this hasn't been created in the editor yet:

    What mine does is insert text with three bits of data: the text component in question, the text to be inserted, and the char position to insert. The output is the complete code, just in case.

    Click to insert a random letter in a random position.


    And a fun one:

    Click to invert.


    Problem is, I'm stuck on a scrambler.-----------------
    Hopefully PA is inconsistent.
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeNov 15th 2010 edited
     
    Xyuzhg thats fun but useful.

    lol pǝpǝǝu dılɟ lɐɔıʇɹǝʌ ʎluo ʎllɐnʇɔɐ llǝM ¡sıɥʇ ʇuǝʌuı plnoɥs ǝuoɯos ʍoN

    No, I'm not crazy. Text is just upside down.-----------------
    •  
      CommentAuthorBioManiac R2 (Moderator)
    • CommentTimeNov 15th 2010
     
    actually ur wrong Firemil you'd still need to flip it Horizontally too and not just vertical :P
    •  
      CommentAuthorTheDudeFromCI (Advanced Member)
    • CommentTimeNov 15th 2010
     
    Wow, even upside down I can still read Firemil's text. How come lol?-----------------
    Orange is my favorite number.
    •  
      CommentAuthorBuilder
    • CommentTimeNov 16th 2010
     
    how works custom function-----------------
    (insert good signature here)
    •  
      CommentAuthorTapir
    • CommentTimeNov 17th 2010
     
    you can call custom functions the same as core APIs.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorBuilder
    • CommentTimeNov 17th 2010
     
    can someone teach me how this works?-----------------
    (insert good signature here)
    •  
      CommentAuthorTapir
    • CommentTimeNov 17th 2010
     
    Do you mean how to use the functions provided by other members?

    You can copy the source code and import the functions into your own design.
    Then you can call custom functions the same as core APIs. The custom functions are all in the "custom" API menu.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorBuilder
    • CommentTimeNov 17th 2010 edited
     
    no i mean to make a own function

    i builded a color changer out of the slider idea-----------------
    (insert good signature here)
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeNov 17th 2010
     
    builder, otherwise exellent but you should make it a bit smaller:
    R, G and B values only go up to 255.-----------------
    •  
      CommentAuthorBuilder
    • CommentTimeNov 17th 2010
     
    i try but dont get it to work right
    when i set end x different the slider just go to 300
    dont know why-----------------
    (insert good signature here)
    •  
      CommentAuthorBuilder
    • CommentTimeNov 17th 2010 edited
     
    ah now its works
    but cannot get it on 255 if i set end x to 17.8 the number is 256
    and if i set it on 17.7 the number is 254-----------------
    (insert good signature here)
    •  
      CommentAuthorRanthowis
    • CommentTimeNov 17th 2010
     
    17.75 = 255 maybe?-----------------
    Hi?....
    •  
      CommentAuthorBuilder
    • CommentTimeNov 17th 2010
     
    yes it works thanks-----------------
    (insert good signature here)
    •  
      CommentAuthorBioManiac R2 (Moderator)
    • CommentTimeNov 18th 2010
     
    hey builder want to make your design even more amazing?
    set the background of the text box with the number to fill
    then set the background colour of the text box as follows
    255 - reg#1
    255- reg#2
    255- reg#3
    where reg#1,2&3 are the red/green/blue colours of the actual background colour :P
    •  
      CommentAuthorMadball (Advanced Member)
    • CommentTimeNov 23rd 2010 edited
     
    Press writing keys (letters, numbers and punctuation) and backspace.



    I will update it after. It should have nearby 2125 words in final version.-----------------
    LD35!
    • CommentAuthorXyuzhg (Moderator)
    • CommentTimeNov 24th 2010 edited
     
    I think this is the most useful one in this thread...

    After working for about 90 mins, I perfected the Camera-Scale Auto-adjuster:


    Two chosen objects will always be visible on the screen.

    The inputs are the two entities you want the camera to keep on the screen, the camera ID, the minimum and maximum scales you want, and the viewport size. Honed to near-perfection. Works best for object of reasonable size and speed. I hope it'll be useful in goldberg scenes where you want to let your audience see two objects at all times. I myself am using it right now.


    -----------------
    Hopefully PA is inconsistent.
    •  
      CommentAuthorBuilder
    • CommentTimeNov 24th 2010
     
    how to make an custom function?
    can someone explam?-----------------
    (insert good signature here)
    •  
      CommentAuthorTapir
    • CommentTimeNov 26th 2010
     
    @Xyuzhg, it is great for storytelling designs.

    @builder, to create a custom function:
    1. go to the function view (press the right most button)
    2. create a custom function entity
    3. set input and output parameters
    4. global variables and registers can't be used in custom functions, so you may need create some loval variables
    5. program just like that in event handler dialog.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorBuilder
    • CommentTimeNov 26th 2010 edited
     


    its a easy to set score board-----------------
    (insert good signature here)
    • CommentAuthorgriz
    • CommentTimeNov 26th 2010 edited
     
    tapir:
    to create a custom function:
    1. go to the function view (press the right most button)
    ~~~
    ok. says [nothing]
    ~~~

    2. create a custom function entity
    ~~~
    how?
    ~~~

    3. set input and output parameters
    4. global variables and registers can't be used in custom functions, so you may need create some loval variables
    5. program just like that in event handler dialog.-----------------
    Random numbers are far too important to be left to chance.
    • CommentAuthorMCC (Moderator)
    • CommentTimeNov 26th 2010 edited
     
    @griz
    I realize that there isn't much material about the editor, neither commented out codes or tutorials about it.
    It is a true lame actually. Let's see if the new nominees for moderators are a little less lazy than me and get something done about that...
    (What...? You guys didn’t actually though you would just get a "Ban" button next to people’s accounts and then everything would be the same... did you? He, he, he. :P)
    ...but a general Help and Advice thread (or FAQ) will be started for both the forum and the editor, including all of the questions for these sort of matters so we don't have to re-answer the same questions over and over again.

    Well, anyway, to create a new function, you don't have to go to the "Custom" tab...
    That is where you access the functions you created.
    To create one, you must go to the function pannel (it is pretty much like the collision categories pannel), which can be accessed here:

    (url)

    That is the button Tapir actually mentioned, but there seems to be an evil virus that spoils communication here...! ;)
    The function pannel looks as follows:

    (url)

    And this is the window you get when you edit a function:

    (url)

    Finally, here's a simple function for you to analize...



    Make sure to check out both the "OnShapeMouseClick" event handler and the "Find Hypotenuse" function in the function pannel to see how everything works.

    Now I've got to dig up myself from the desk's chair and go to bed...
    I've been here for 5 hours already, and it's 2 o'clock in the morning. ;)-----------------
    I'm still around... observing.
    I leave all that I own to my cat guppy
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeNov 27th 2010
     
    Xyuzhg's camera scaler is awesome, you can make it to not zoom too close, I think that is cool.-----------------
    •  
      CommentAuthorMadball (Advanced Member)
    • CommentTimeNov 27th 2010
     
    Yes, it is, but it works normally only for small objects. For big ones, they won`t fit in viewport fully.-----------------
    LD35!
    • CommentAuthorXyuzhg (Moderator)
    • CommentTimeNov 27th 2010 edited
     
    I can add that input option, but only with at least 3 requests. It'll be annoyingly difficult to do right now, though.-----------------
    Hopefully PA is inconsistent.
    •  
      CommentAuthorMadball (Advanced Member)
    • CommentTimeNov 27th 2010
     
    You can just add "Add to scale" input. For example, you get 1.5 scale, but you need 0.1 more, you set "Add to scale" to 0.1 and scale becomes 1.6.-----------------
    LD35!
    •  
      CommentAuthorTapir
    • CommentTimeNov 28th 2010
     
    It is a new great tutorial!
    Many many thanks, MCC.
    I'm sorry it spent you so much time.

    It is my mistake for still not made enough tutorials yet.
    Hope the website development of the next version will be done soon so that I have enough time to write some.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeDec 7th 2010
     
    Bump, this is coming hard to find.-----------------
  1.  
    i created a function that finds the distance and direction in degrees of two objects and it can round the outputs


    •  
      CommentAuthorMadball (Advanced Member)
    • CommentTimeDec 24th 2010 edited
     





    Bullet - bullet shape
    Shooter - shape that shoots the bullet. Bullet appears in coordinates of shooter shape
    Angle - angle at which bullet is shooted. 0 is right, 90 is down, 180 is left, 270 is up.
    Accurancy - accurancy of shooting. If it`s 0, ball passed through point it was sended to (point you clicked in my example). If it`s more than 0, ball has some velocity offset.
    Angle accurancy - how accurate angle is. If it`s 1, angle is rounded to nearby 5.71, so, if you can shoot at angle 0, but you can`t shoot at angle 2, you can shoot at angle 5.71. If it`s 2, angle is rounded to nearby 2*nearby 5.71. It becomes more noticeable when it`s lower than 1, so, if it`s 0.1, you can shoot in 8 directions only.
    If you will set it to 0 and shoot, it will move world borders (and something else)!
    Speed - how fast bullet will move.


    This also has some other useful functions.

    Oops! It doesn`t load for me!-----------------
    LD35!
    •  
      CommentAuthorTapir
    • CommentTimeDec 24th 2010 edited
     
    "Oops! It doesn`t load for me!"
    confirmed, it is a bug, I will fix it soon.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    • CommentAuthorXyuzhg (Moderator)
    • CommentTimeJan 2nd 2011 edited
     
    This is sorta a report of my other text function, but I now have 3 more...





    You must include all five in one level; most of the functions use each other. So removing one, unless it's the invert text or split one, will ruin another.

    There is a secret in that pack, by the way.-----------------
    Hopefully PA is inconsistent.
    •  
      CommentAuthorRanthowis
    • CommentTimeJan 2nd 2011
     
    To be honest, I just feel like I'm clicking pointlessly.-----------------
    Hi?....
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeFeb 10th 2011
     
    Bumped because of a new function.



    I'll make lots of these entity group functions because they are needed in some cases. But remember to NOT use Entity group array in other than entity group functions I will make because the arrays contain sometimes lots of "null" variables.

    (BTW, black/white dont change because of the function, dont worry)-----------------
    •  
      CommentAuthorTapir
    • CommentTimeFeb 12th 2011
     
    I just added 2 new APIs:
    - SetArrayLength - If the new length is smaller than the old one, some elements will be discarded. If the new length is larger than the old one, some elements with undefined values are appended.
    - RemoveElementAt - remove an element in an array by index. The array length will decrease by one. You can use this API to remove some null elements.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorFiremil (Advanced Member)
    • CommentTimeFeb 13th 2011 edited
     






    You dont have to use CreateArray to use Entity Groups. These functions are just like the original ones, except these use arrays. These here are made for handling big amounts of entities quickly. Only thing you have to do is set the entities to the array with the first tool, and you can start using the functions.

    Each pack contains add/remove tool + 4 other functions.-----------------