This site has been archived and made available for preservation purposes. No edits can be made.

Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: NPC sync

  1. #11
    How to create a NPC to Pawn?

  2. #12
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    Code c:
    native CreateActor(actor, ID, cell = 0, Float:X = 0.00, Float:Y = 0.00, Float:Z = 0.00);

    You can either spawn at an ID or give the coordinates yourself. So this are the two ways of calling:

    Code c:
    CreateActor(actor, ID);
    CreateActor(actor, 0, cell, Float:X, Float:Y, Float:Z);

  3. #13

  4. #14
    Please write some sample code to spawn NPC on Pawn.
    Last edited by PolGhost; 01-05-2013 at 02:22 AM.

  5. #15
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    Code c:
    public OnPlayerChat(ID, message{})
    {
    	CreateActor(0x30D82, ID); // spawning Carter at ID (the player who typed something)
    	return 1;
    }
    I think it is really straightforward.

  6. #16

  7. #17
    Hey Recy I was wondering if you've implemented ragdoll or physics synchronization yet to the mod, I figured because since AI is synced now could players all see the same body and loot the body?

  8. #18
    Senior Member Volumed's Avatar
    Join Date
    Aug 2011
    Location
    Holland
    Posts
    1,010
    Blog Entries
    1
    Quote Originally Posted by JGee215 View Post
    Hey Recy I was wondering if you've implemented ragdoll or physics synchronization yet to the mod, I figured because since AI is synced now could players all see the same body and loot the body?
    ragdoll or physics synchronization is really hard to create, but you can already loot and see the same body it have nothing to do with the AI sync but npc sync.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •