Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
asPitchDetect Xtra
KKT Interactive
Full Screen Projectors
ADOXtra Lite
Animated Slider Puzzle by J.R.D.R.
Dialog Xtra
Buddy Saver
Volume of Sprite
Music Xtra
Replace tabs with spaces
MediaMacros Xtras Mall
 

 

 

Behavior authoring method docSprite()

Added on 3/1/2004

 

Compatibilities:
D8_5 D9 Mac PC Script

This item has not yet been rated

Author: benjamin (website)

-- RETURNS: string -- PARAMS: int channnel, int frame -- DESCR.: documents a sprite's scriptList as string -- EXAMPLE: put docSprite(20,2)

on docSprite( aIntCh, aIntFr )
  --   RETURNS:       string
  --   PARAMS:        int channnel, int frame
  --   DESCR.:        documents a sprite's scriptList as string
  --   EXAMPLE:       put docSprite(20,2)
  --                  -- "
  --                  -- ** scripts on sprite(20) in frame(2/"label_A") ** --
  --
  --                  myBhv    {member 10, 1}
  --                      a:    20
  --                      b:    0
  --
  --                  myBhv_02    {member 11, 1}
  --                      prop1:    20
  --                      prop2:    0
  --
  --                  --/** scripts on sprite(20) in frame(2) ** --"


  tStr = ""

  if integerP(aIntCh) then
    if integerP(aIntFr) then


      beginRecording


        tOldFrame = the frame
        go frame(aIntFr)


        if the framelabel=0 then
          tFrameLabel = ""
        else
          tFrameLabel = QUOTE & the framelabel & QUOTE
        end if

        put RETURN & "-- ** scripts on sprite("&aIntCh&") in frame("&aIntFr&"/"&tFrameLabel&") ** --" after tStr
        put RETURN after tStr

        tScriptList = sprite(aIntCh).scriptList
        repeat with i = 1 to tScriptList.count

          tScript = tScriptList[i]

          put RETURN & tScript[1].name after tStr
          put TAB &"{member "& tScript[1].memberNum &", "& tScript[1].castlibNum &"}" after tStr

          tSettings = value(tScript[2])
          if listP(tSettings) then
            repeat with j = 1 to tSettings.count

              put RETURN &TAB& tSettings.getPropAt(j) &":"&TAB& tSettings[j] after tStr

            end repeat
          end if

          put RETURN after tStr

        end repeat

        put RETURN & "--/** scripts on sprite("&aIntCh&") in frame("&aIntFr&") ** --" after tStr

        go frame(tOldFrame)


      endRecording


    end if
  end if

  return tStr
end docSprite

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail