Need help with this guy, Shake and attribute .

ThaniThani Member Posts: 128
edited November -1 in Working with GS (Mac)
Ok , I'm kinda new to gamesalad and got two questions .
1 , How can I activate a shake in my background ? ( Let it shake my background )
2 , What does each attribute mean and what are the various stuff we can use them for ?
I've watched a couple of tutorials and didn't see that explains attributes , if there is a tutorial , please link it to me .

Comments

  • DimensionGamesDimensionGames PRO Posts: 993
    1.There is no set behaviour for that but maybe you could use interpolate?
    2.Get Photics Textbook.
  • HachikoHachiko Member Posts: 330
    To shake the whole scene you can really fast change the camera origin.x and camera origin.y.
    A simple (not performance optimized) way could be
    Timer For 2 --time of the shake
    inside
    Timer every 0.2 --intensity of the shake
    inside
    camera origin.x = random(camera origin.x - 20, camera origin.x + 20)
    camera origin.y = random(camera origin.y -20, camera origin.y +20)

    This should move every scrollable layer.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Type Gamesalad Cookbook in to YouTube. Everything you need is there

    Ace
  • QbAnYtOQbAnYtO Member Posts: 523
    except this i looked for this aswell. thanks hachiko, not sure if it works since i haven't tried it. but i'll try lateron. do those attribute pre exist in every game?
  • QbAnYtOQbAnYtO Member Posts: 523
    hmm i can't figure this out... i can't find the camera origin attribute in the "change attribute" event. can you describe it step by step?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    QbAnYtO said:
    hmm i can't figure this out... i can't find the camera origin attribute in the "change attribute" event. can you describe it step by step?

    the actor has to be unlocked to access scene attributes such as camera. Drag your actor onto the scene double click it then click on the lock that pops up to unlock it. Then when you put in a change attribute behavior youll see scene attributes in the list and the cameras in there,
  • QbAnYtOQbAnYtO Member Posts: 523
    oooooh ok lemme try again. this shyt just crashed AGAIN.. f*ck man this is getting ridiculous
  • QbAnYtOQbAnYtO Member Posts: 523
    hmm.. its not working.. maybe i'm doing something. the background and everything in this layer is scrollable... i'ma get trying and i'll update.... on a side note, whats the diference between a prototype and an unlock?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    A prototype has all the rules in the original actor, and they change based on the original actor. So say you make a actor and drag five on screen, they will all have the same behavios as the original actor you made, and whatever you change in there will also change in the five actors onscree. When you unlock it, it no longer follows the behaviors of the original actor and whatver you change in there has no effect on the other actors of the same one.

    So say you wanted one actor going left and onegoing right of the same image or whatever, instead of making two actors with different behaviors with the same image, you can just make one actor wiht the image and then unlock them both in the scene and add different behaviors
  • QbAnYtOQbAnYtO Member Posts: 523
    ahh ok. basically making the parent and child, or making a child into a parent. got it. thanks.... any idea why this shake thing isn't working?

    am i supposed to add this "move camera" event thing to a collision event? i tried this:

    "when block collides with ground, change attribute camera origin.y. to random(camera origin+20)"

    wow. just from looking at this after typing it, already looks f-ed up lol
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    the random expression is wrong. When using random you put the minium and the maximum numbers inside the parenthesis. So id you wanted to move the camera randomly between 10 and 20 pixels it should look like this.

    Change attribute camera origin.y. to random(10,20)
  • QbAnYtOQbAnYtO Member Posts: 523
    ooohhh ok. i take it u can't sleep? ur posting all over the place!!!! lol thanks i'ma try this RIGHT NOW....
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    QbAnYtO said:
    ooohhh ok. i take it u can't sleep? ur posting all over the place!!!! lol thanks i'ma try this RIGHT NOW....

    insomnia, i get alot of work done though :)
  • QbAnYtOQbAnYtO Member Posts: 523
    it worked!!!!!!

    but i want it to come back to its original position. it stay at the new random position. should i add something?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    QbAnYtO said:
    it worked!!!!!!

    but i want it to come back to its original position. it stay at the new random position. should i add something?

    just put a timer in for how long you want to return to normal. So in the actor you have the rule change attribute camer origin y to random (10,20)

    So under that put a timer in and have it say after 2 seconds or howerver long you want), change attribute camera origin y to 0
  • QbAnYtOQbAnYtO Member Posts: 523
    yea u beat me to it. i figured that one allll by myself "look ma! no hands!"

    thanks again bro!

    i made it "shake" every 0 seconds for 0.5 seconds and the effect is VERY nice. thank you so much.
  • QbAnYtOQbAnYtO Member Posts: 523
    its not the first time you've helped me :)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    flocka!

    and anytime, glad it worked for you :)
  • QbAnYtOQbAnYtO Member Posts: 523
    yea haha i'm ecstatic man! i know its silly, but the more i see my game progress the happier and more excited i am!!!

    ::goes jump off the balcony::
Sign In or Register to comment.