Please post here if you need support on your project. I can give you a variety of scripts. Also feel free to ask if you want some music, and the genre. I'd be happy to help with any scripting. Here are some basic scripts:
Gliding to mouse:
when gf clicked forever point towards [mouse-pointer v] move ((distance to [mouse-pointer v]) / [10]) steps endBouncing off a circle:
when gf clicked forever if <touching [sprite v]?> point towards [sprite v] turn clockwise (180) degrees end move (speed) steps endNow that's just basic coding.
when gf clicked set [speed v] to (100) set [range v] to (100) forever set y to (([sin v] of ((timer) * (speed))) *(range)) endOn that one, I tried to make it user-friendly. Speed is how fast it will move, range is how high it will go. The actual range is range*2, but this range is in height.
when gf clicked forever if <key [right arrow v] pressed?> change [xvel v] by (1) end if <key [left arrow v] pressed?> change [xvel v] by (-1) end set [xvel v] to ((xvel) * (.87)) change x by (xvel) if <touching [level v]?> change y by (([abs v] of (xvel)) + (1)) if <touching [level v]?> change y by ((0) - (([abs v] of (xvel)) + (1))) change x by ((0)-(xvel)) set [xvel v] to ((xvel) / (2)) end end if <key [up arrow v] pressed?> change y by (-1) if <touching [level v]?> set [yvel v] to (10) end change y by (1) end if <(yvel) < [3]> change y by (-1) if <not<touching [level v]?>> change [yvel v] by (-1) end change y by (1) end set [yvel v] to ((yvel) * (0.9)) change y by (yvel) if <touching [level v]?> change y by ((0) - (yvel)) set [yvel v] to ((yvel) / (2.5)) end endI'll add a few more on by request.
Last edited by chanmanpartyman (2012-03-31 22:22:35)
Offline
I like the last script.
Offline
turkey3 wrote:
I like the last script.
Yeah, I use it a lot.
Offline
MaxFlyboy wrote:
Add Gravity, seems like the "Help with Scripts" forum is getting filled up with ones that need help with gravity.
Okay, do you want to know how to do it or do you want me to add it up at the top?
Offline
pi3 wrote:
Wow! Very nice scripts!
However, could you maybe add a description to that last one to explain how it works! Thanks!
Well, it works by creating a sine wave. That's pretty much it
Offline
chanmanpartyman wrote:
MaxFlyboy wrote:
Add Gravity, seems like the "Help with Scripts" forum is getting filled up with ones that need help with gravity.
Okay, do you want to know how to do it or do you want me to add it up at the top?
No, I know how to do it. It just gets kind of annoying answering 10 topics about how to do gravity. It helps to be able to put in a link that has the blocks.
Add it up at the top with the other scripts.
Offline
MaxFlyboy wrote:
chanmanpartyman wrote:
MaxFlyboy wrote:
Add Gravity, seems like the "Help with Scripts" forum is getting filled up with ones that need help with gravity.
Okay, do you want to know how to do it or do you want me to add it up at the top?
No, I know how to do it. It just gets kind of annoying answering 10 topics about how to do gravity. It helps to be able to put in a link that has the blocks.
Add it up at the top with the other scripts.
Oh, okay. I'll have it up tomorrow.
Offline
chanmanpartyman wrote:
pi3 wrote:
Wow! Very nice scripts!
However, could you maybe add a description to that last one to explain how it works! Thanks!
Well, it works by creating a sine wave. That's pretty much it
![]()
That doesn't really tell me much.
What is a sine wave?
Offline
pi3 wrote:
chanmanpartyman wrote:
pi3 wrote:
Wow! Very nice scripts!
However, could you maybe add a description to that last one to explain how it works! Thanks!
Well, it works by creating a sine wave. That's pretty much it
![]()
That doesn't really tell me much.
What is a sine wave?
It's a wave of slopes created by using the sine function.
Offline
coolhogs wrote:
Wall jumping script?
I'll have for you in 20-48 hrs.
Offline
I also need some music.
Can you do some fairy music that slowly becomes suspense music? This should last 5 minutes.
Also can you do a "ding" sound? This should last 0.7 seconds.
Last edited by coolhogs (2012-03-19 16:01:30)
Offline
coolhogs wrote:
I also need some music.
Can you do some fairy music that slowly becomes suspense music? This should last 5 minutes.
Also can you do a "ding" sound? This should last 0.7 seconds.
I don't do sound effects, just music. Sorry
Anyhow, I'll have it on a project on my test account (cmpm_test) and drop you a message when it's up.
Offline
coolhogs wrote:
Wall jumping script?
Implement this:
change x by (10) if <touching [level v]?> if <key [up arrow v] pressed?> set [xv v] to (-10) set [yv v] to (10) end end change x by (-20) if <touching [level v]?> if <key [up arrow v] pressed?> set [xv v] to (10) set [yv v] to (10) end end change x by (10)If it doesn't work please contact me @ one of my projects so I get a message. Checking up on this is tedious.
Last edited by chanmanpartyman (2012-03-26 08:09:11)
Offline
Mesh script:
when i receive [connect 1 v] set [connected v] to (1) //first assume connection if <(me) = (1)> broadcast [connect 2 v] and wait end set [connected v] to (0) //only if the other script doesn't wait when i receive [connect 2 v] set [connected v] to (1) if <(me) = (2)> broadcast [connect 1 v] and wait end set [connected v] to (0)When one of the above two scripts is activated, it will check if the "me" variable is equal to one or two. Then it calls the other script, which will interrupt the first one waiting for the second one to finish (if it is in the other version of the project (the only way the "me variable to be different)), and wait for that script to finish, which if it still connected will interrupt the other script which will interrupt the first script.....
when green flag clicked //or any hat
ask [Are you player 1? or player 2?] and wait
repeat until <<(answer) = (1)> or <(answer) = (2)>>
ask (join (answer)[was not an option. Pick either 1 or 2.]) and wait
end
set [me v] to (answer)
repeat until <(connected) = (1)>
broadcast (join [connect ](me))
if <(me) = ([me v] sensor value)>
say [Oops! Your opponent selected the same number! Press space to change player.]
wait until <<key [space v] pressed?> or <not<(me) = ([me v] sensor value)>>>
if <key [space v] pressed?>
set [me v] to ((3) - (me))
say (join (join [You are now player ](me))(.)) for (1) secs
else
say (join (join [Other player changed. You are still player ](me))[.]) for (1) secs
end
end
end
forever if <(connected) = (0)>
say [Connection error.] for (2) secs
stop all
end
when i receive [something v]//scripts where each player should do something different
if <(me) = (1)>
stuff that player 1 does, not player 2
else
stuff that player 2 does, not player 1
end
Last edited by joefarebrother (2012-03-23 16:53:12)
Offline
Agentpieface
these?
if <touching [level v]?> change y by (([abs v] of (xvel)) + (1)) if <touching [level v]?> change y by ((0) - (([abs v] of (xvel)) + (1))) change x by ((0)-(xvel)) set [xvel v] to (0) end end
Offline
Unite wrote:
Mind getting me some adventurous music for the kirby game I'm making?
here is some kirby superstar music http://downloads.khinsider.com/game-sou … super-star
Last edited by ftf841 (2012-03-29 21:14:41)


Offline
if <(y position) > [~150]> set y to [~150] end if <(y position) < [~-150]> set y to [~150] end
Last edited by chanmanpartyman (2012-05-21 13:19:18)
Offline
I am doing a physics challenge for school, and I need to make a mobile that responds to the weight of different objects. Also, I need to have the objects respond to the tilting of the central bar. Here are the scripts so far:
when gf clicked //central bar scripts forever point in direction ((weight2) - (weight1))Weight2 and weight1 are the different weights of the objects. Think you could help?
Offline
forever switch to costume [ship v] show go to x: (xposship) y: (yposship) if <key [up arrow v] pressed> change [yposship v] by [1] end if <key [down arrow v] pressed> change [yposship v] by [-1] end if <key [right arrow v] pressed> change [xposship v] by [1] end if <key [left arrow v] pressed> change [xposship v] by [-1] end switch to costume [enemy v] go to x: (eposx) y: (eposy) change [eposx v] by [1] change [eposy v] by (slant) if <touching color [#F7F5F6]> //whatever color change [ship lives v] by [-1] hide endIs this a good 1s1s script?
Last edited by mythbusteranimator (2012-05-21 13:54:55)
Offline
mythbusteranimator wrote:
forever switch to costume [ship v] show go to x: (xposship) y: (yposship) if <key [up arrow v] pressed ?> change [yposship v] by [1] end if <key [down arrow v] pressed ?> change [yposship v] by [-1] end if <key [right arrow v] pressed ?> change [xposship v] by [1] end if <key [left arrow v] pressed ?> change [xposship v] by [-1] end switch to costume [enemy v] go to x: (eposx) y: (eposy) change [eposx v] by [1] change [eposy v] by (slant) if <touching color [#F7F5F6] ?> //whatever color change [ship lives v] by [-1] hide endIs this a good 1s1s script?
Scripts fixed.
Offline