answersLogoWhite

0


Best Answer

There is a tutorial. Here:ShockScript is a scripting engine for Flash written by me, Shock Value.

It allows you to write your own scripts to make events occur in the gameworld.

For example, you might write a script that causes an explosion to occur if the Buddy touches a wall.

Or you might write a script that shoots a continuous stream of baseballs at the Buddy.

(Both of these examples are provided as sample scripts, among others.)

It's all up to you.

However, to get these results, you must familiarize yourself with the language.

These help files assume that you have at least a basic understanding of programming concepts.

If you are familiar with Flash Actionscript or JavaScript, you should have no problem.

If you are new to programming, then you will need to learn basic programming concepts first, which is knowledge that is outside the scope of these help files.

Expressions are written just as they are in Actionscript or Javascript.

1+2 evaluates to 3.

1+2*3 evaluates to 7.

(3*(8-6)-2)*(3+3) evaluates to 24.

ShockScript includes all of the operators that are available in Actionsript and uses the same precedence rules as ActionScript uses.

* : multiplication

/ : devision

% : modulo

+ : addition and string concatenation

- : subtraction

<< : bitwise left shift

>> : bitwise right shift

>>> : bitwise unsigned right shift

< : less than

<= : less than or equal to

> : greater than

>= : greater than or equal to

== : equal to

!= : not equal to

& : bitwise AND

^ : bitwise XOR

| : bitwise OR

&& : logical AND

: logical OR

The operators above are ordered by decreasing precedence.

Variables are assigned as follows.

myVar = 1+2;

'myVar' now holds the value '3'.

anotherVar = "variable number "+2;

'anotherVar' now holds the string "variable number 2"

thirdVar = 1+myVar*2;

'thirdVar' now holds the value '7'

Variables can also be assigned by using the assign(varName,expression) function, which will be explained later.

Semicolons (;) separate lines of code and MUST be used.

This is unlike Actionscript, which recognizes line breaks as well as semicolons as ending lines of code.

Example:

myVar = "Hello!";

trace(myVar);

setGrav(0)

Functions can be used as follows:

someFunction(argument1,argument2)

You cannot define your own functions; you must use the built in ones. However, there are many built in functions which are listed on the following help page. You can use functions anywhere an expression is used, just like in ActionScript.

Function LIST!!:

text,time)

explode(x,y,power) 1.0 is about normal for power

create(objectType,x,y,xVelocity,yVelocity) valid objectType strings: "Baseball", "molotov", "bowlball", "bouncyball", "grenade", "fireball", "mine", "baby", "orb", "radio", "vortex". Returns the unique objectName assigned to the object you created.

destroy(objectName) removes specified object (if destructable)

noAutoDelete(objectName) makes specified object not be auto deleted when adding more objects; note that it can still be destroyed through destroy() function or through a mousover when a throwing item is selected

addConstraint(objectName,x,y,len) adds a constraint to specified target (objectName) at x, y of length len; constraint is removed when object is deleted

addSpring(objectName,x,y,strength) similar to addConstraint, except with a flexible attachment; strength can be between 0.0-1.0, but lower numbers (like .05) work best

resetForces() resets all added forces (constraints, springs, etc.)

flashMessage(text, timeInFrames)

water(x, y, xv, yv, lifeSpanInFrames, strength, spread, size, disappearOnContact)

fireClip(x, y, xv, yv, lifeInFrames, scale) about 4.0 is normal for scale

addBuddyVel(x,y)

setBuddyVel(x,y)

setBuddyPos(x,y)

addBuddyRot(rotationAmount)

setBuddyRot(angleRadians)

getBuddyRot()

getBuddyX()

getBuddyY()

getEmotion() returns happiness of buddy from -100.0 to 100.0

getXV(objectName) returns x velocity of object, valid strings for objectName: "body", "rArm", "lArm", "rLeg", "lLeg", plus all strings returned by 'create' function (see ex-throwableBall)

getYV(objectName) ... y velocty ...

getX(name) ... x position ...

getY(name) ... y position ...

playSound(soundName)

resetVariables() resets all user variables

pow(x,y) returns x to the y power

sin(x)

cos(x)

tan(x)

atan(x)

atan2(x,y)

max(x,y) returns greater value

min(x,y) returns lesser value

sign(x) returns -1 if negative, 0 if 0, 1 if positive

random() returns random floating point, 0.0 to 1.0

randomBet(x,y) returns random floating point between x and y

sqrt(x)

ceil(x)

floor(x)

round(x)

pi() returns pi (3.14159...)

e() returns e

asin(x)

acos(x)

abs(x) absolute value

charAt(string,letterPosition)

bnot(x) returns false if x is true, true if x is false

bor(x,y) logical OR (same as xy)

band(x,y) logical AND (same as x&&y)

above(x,y) returns true if x is greater than y, else false (same as x>y)

below(x,y) x<y

equal(x,y) x==y

sqr(x) returns x*x

exp(x) returns e to the x

log(x)

gettime() returns time since movie start, in seconds

getXMouse()

getYMouse()

getMouseDown()

if(value,arg1,arg2)

This is the if statement in ShockScript. It is actually set up like a function, but it works differently. First it evaluates 'value'. If it is true, then 'arg1' is evaluated and returned. Otherwise 'arg2' is evaluated and returned. Note that after 'value' is evaluated, either 'arg1' or 'arg2' will be evaluated, not both.

loop(num,arg)

This function evaluates 'arg' for 'num' number of times (the maximum is 2000)

setBuffer(bufferNumber,position,value)

Sets the element at 'position' of the 'bufferNumber' buffer (or array) to the 'value'. 'bufferNumber' may be any number from 0 to 1000

getBuffer(bufferNumber, position)

Returns the element at 'position' of the 'bufferNumber' buffer.

assign(myVar,value)

Same as writing 'myVar = value'. Note that the first argument of the function is not a string, it is the exact text that you write. You would use this function like this: assign(x,10); which would set variable 'x' to '10'.

evaluate(scriptText)

This function allows you to evaluate text as if it were ShockScript code. Example: 'evaluate("x = "+10)' would evaluate 'x = 10' and thus set variable 'x' to '10'.

firstRun()

This function returns true on the first run of your code when 'Run Every Frame' is checked, and false on every other run.

If you click 'Run Once', it is also true for that run.

When writing scripts, be sure that they conform to general coding standards and those listed above.

ShockScript has little to no error detection, so erroneous scripts might compile and run with unexpected results.

In Flash, syntax errors are recognized by the compiler automatically, but again, in ShockScript this is not the case.

The reason ShockScript has no error detection is simple--I just don't have to time to write it in.

The process would be difficult and full of bugs.

And it would never be perfectly consistant, so I wouldn't want people to rely on it.

So, unfortunately, you will have to locate all syntax errors yourself.

Also, all example scripts should be set to run every frame unless otherwise noted.

This includes th function list as well! BYE!

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create interactive buddy scripts yourself?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Whereis your buddy list on aim?

To find your buddy list on aim, you will need to first log onto AOL. Select the &acirc;??Members&acirc;?? menu and select &acirc;??Buddy List&acirc;??. The &acirc;??Buddy Lists&acirc;?? dialog box will appear.,


How do you make a script in interactive buddy?

a programming script is pretty high-tech, i, being a kid at quite a young age, obviously had troubles with this, but you can describe a script as a coding language that can modify the motion, physical behavior, and changes to an object in a game.you will need to piece these codes together for the language to lock up in reaction chains for them to work.here are oen of the scripts i can come up with: fog water(getBuddyX(), 0, 0, 0, 10, 10, 400, 400, false)); this script creates a large, but not actually very harmful, blast of water, which is the "fog".you dont need to worry about the first three zeros, but the last four numbers are critical for the type of the fog.the higher number the number you tune up for the first two, will determine the pressure of the fog.if you turn it any higher than 20, your buddy will be thrown across the wall by the force of it.if you tune it up over 50, your buddy will be instantaneously knocked out by it.the last two numbers determine the density of the fog.the lower the number, the less fog there is, and the higher the numbre, the bigger the fog is.the fog is mainly used for the cool effect and to put out widespread fires.run it every frame for a continous fog, or once for a quick punch of it.


How is geometry used in building bridges?

I dont know i need the same answer buddy!


Hey can anybody tell you the registration code of block website buddy 3.0 please?

i also want


How much does a subway enginecar weigh?

Go under one and lift it and find out.See you in heven buddy. .:)

Related questions

How do you create object world beta buddy scripts yourself?

Its Impossible to create scripts in object world beta because there are no tutorialsat the moment.Only shockwave "the creator of the game" knows it.


How do you get guns in interactive buddy?

type in interactive buddy with guns on google and check all the links that come


Can you kill interactive buddy?

No you cannot kill Interactive buddy. The game was designed so you could play....forever.


What is the difference between interactive buddy and interactive buddy 2?

Interactive buddy 2 has guns and new stuff the guns are the pistol the shotgun and the machine gun, these are under the gun category, the stun gun is in the miscellaneous category


Where could one play Interactive Buddy 2?

Interactive Buddy 2 can be played on a large number of websites. The Interactive Buddy 2 website is a good place to start looking, after which websites like Addicting Games and Y8 also have the game.


How can you get interactive buddy cheats?

go to www.cheatcodes.com


Where can you play interactive buddy 2?

deviantart.com


Who is Tom from interactive Buddy?

Tom Fulp


Can the interactive video buddy tapes work without the system itself?

yes but they won't be interactive


What website has a game called interactive buddy?

addictinggames.com


How do you get rid of radio in interactive buddy?

Hit backspace.


Is interactive buddy for Wii?

yes to play it go to www.xgenstudios.com on the wii internet and it should let you play interactive buddy. Ps you need wi-fi internet connection