User Tag List

Results 1 to 6 of 6

Thread: Started Writing New Script Types

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,765
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.86%
    Quote Originally Posted by Tamamo View Post
    Dude lweapon and eweapons are the same damn thing, only difference is what vector they are stored in. They only require one script. Not two.
    We had this conversation on Discord. I want them separate for my own purposes, not limited to keeping their refInfo segregated, and to ensure that there are an equal number of slots for creating enemy and player weapon scripts.

    NPC scripts are hovering near 90%.

    Alpha 3





    Script

    Code:
    npc script N
    {
    	void run(){TraceToBase(64,10,2); this->X = 16;}
    	
    }

    Assembly

    Code:
    N
     SETV d2,0
     SETR d3,REFNPC
     PUSHR d3
     SETR d4,SP
     PUSHR d4
     SETV d2,0.0015
     PUSHR d2
     SETV d2,64
     PUSHR d2
     SETV d2,10
     PUSHR d2
     SETV d2,2
     PUSHR d2
     GOTO 32
     POP d4
     SETV d2,16
     PUSHR d4
     SETV d3,0.0028
     PUSHR d3
     PUSHR d2
     SETR d6,d4
     ADDV d6,0
     LOADI d2,d6
     POP d3
     PUSHR d2
     PUSHR d3
     GOTO 37
     POP d4
     SETV d3,0
     POP d3
     QUIT
     TRACE5
     POP d3
     POP d3
     POP d3
     RETURN
     POP d2
     POP d3
     SETR REFNPC,d3
     SETR NPCX,d2
     RETURN

    Remains to Do


    Save the slot code int he quest file.
    Allow npcs to access it and set the script slot (Enemy Editor)
    Call the script in the ZC game loop.
    Hope that it works.

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social