Lesson X - Blobs.
You make blbs from AVs in the AV editor. You can navigate the 64x64 section around the normal AV sized image
in the AV editor and save it as a blb (they should be saved in the blobs subfolder).
Blobs can be used in scripts, here is a short blob script that makes a blob "scurry" across the screen from where the mouse is...
Program ScurryRight;
Var
X,Y,I : Integer;
S : String;
begin
S:=Args(1);
CreateSpriteByName(S,1);
PauseFor(3000);
Y:=GetMouseY-32;
X:=GetMouseX-32;
For I:=0 to 30 do
Begin
SetSprite(1,1,X+(I*32),Y);
PauseFor(200);
End;
ClearSprite(1);
end.
The script above uses three Sprite commands:
CreateSpriteByName(S,1); - CreateSpriteByName takes a blob name(without .blb) and the blob #.
SetSprite(1,1,X+(I*32),Y); - SetSprite specifies the Sprite #, The Blob # to use for that Sprite #, X and Y.
ClearSprite(1); - ClearSprite clears Sprite#.
We store the commandline argument in a string called "S" for later use.
Then we load the blob named "S" into blob # 1
The PauseFor(3000) command allows the user time(3 seconds) to position the mouse.
It also allows other users time to acquire the loaded Blob from the server.
We subtract 32 from the X and Y of the mouse so that the 64x64 Sprite will be centered on the mouse's position.
We then move the Sprite 30 times pausing 2 tenths of a second between moves.
And then clear the Sprite off the screen.
Users can have up to 8 Blobs saved and use them in up to 32 Sprites.
Blob# = 1 to 8 for each user.
Sprite# = 1 to 32 for each user.
Unlike the "loose props" that we see in other chats, iP's Sprites can not be touched by users.
They are fully script controlled. And they are Owned by their user. Other's scripts can not effect them.
Since iP can have up to 24 users and each can have up to 32 Sprites its possible to have as many as 768 Sprites on the screen at once. However it is highly unlikely...
Other interesting uses for Sprites would include:
Making Blobs that extend your AV and placing Sprites around you to make one large AV.
Making a sofa out of Blobs and placing Sprites under your AV so that you and others may sit in it.
Hug and or Kisses Scripts.
Games.
Signs.
Tutorials |
Home |