Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: How to insert new character ?  (Read 3690 times)

0 Members and 1 Guest are viewing this topic.

BorisC

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
How to insert new character ?
« on: August 17, 2006, 09:19:32 PM »

I want to insert another NPC in scene.
I saw demo with OldGay. It made by entity.
But I want make him walk in some cases and play different animations.
Also, I want to make him 3D.
So, what is my way ?
Add actor by:
actor = Game.LoadActor("actors\NCP\NCP1.act3D");
Game.MainObject = actor;
____________________________________
but it's MainObject..
or I should repeat OldGay way by

global OldGuy = Scene.LoadEntity("entities\oldguy\oldguy.entity");
OldGuy.SkipTo(505, 330);
_____________________________
What is difference ? I mean what is best for NCP ? To be an actor or to be entity ? ;)

You have really great docs but I didn't found how to make NCP :)


P.S.  Now I made "it from" teapot

actor.Active = true;
if(!Game.IsItemTaken("NCP1))
{
  var Teapot = Scene.LoadActor3D("actors\NCP\NCP1.act3d");
  Teapot.SkipTo(1110, 504);
  Teapot.Direction = DI_DOWN;
}

he is standing and plays "idle" but he is not "clickable" and can't even talk with him ;)

I tried to found something on forum but failed.
Is it too easy ? And nobody have questions about that ? ;(((
Logged

BorisC

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
Re: How to insert new character ?
« Reply #1 on: August 17, 2006, 10:22:37 PM »

oh. NCP meanb NPC ;-)
Also, now I have modify script to:
// load our main actor
   global ncp = Game.LoadActor3D("actors\NCP\CNP1.act3d");
   Game.MainObject = ncp;
   ncp.SkipTo(200, 430);
   ncp.GoTo(600, 400);
   whore.Direction = DI_DOWN;
_________________
it works.. oh :)
And I've noticed to make something "clickable"(I mean to call menu) it should be intity. It's Ok with sprites but how to make 3D char. entity ?
Logged

BorisC

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
Re: How to insert new character ?
« Reply #2 on: August 17, 2006, 10:34:28 PM »

Gee...
I've wrote at NCP1.script
on "LookAt"
{
  actor.GoTo(171, 465);
  actor.TurnTo(DI_UPLEFT);

  actor.Talk("Blah, blah, blah");
}
_____________________________
and get menu I've wanted !
wheew !
Is that right way to insert NPC in scene/game ?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: How to insert new character ?
« Reply #3 on: August 18, 2006, 09:01:48 AM »

1) To insert another 3D actor into scene, call something like:

global actor2 = Game.LoadActor3D("path\file.act3d");

2) To be "clickable", any object must have the .Interactive property set to true. Either in script, or in the actor definition file.

Additionally, as you found, the default scripts in wme_demo are written the way that the action menu doesn't show up if the object doesn't provide any of the "LookAt", "Talk" or "Take" handlers.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: How to insert new character ?
« Reply #4 on: August 18, 2006, 03:57:06 PM »

We inserted another 3d char, works fine, but they are walking through each other, how can we make them solid?

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: How to insert new character ?
« Reply #5 on: August 18, 2006, 05:05:06 PM »

There is no collision detection for 3D characters. Asuming that you have only one playable main character in the scene, you can put a blocked region beneath the NPC 3D character.
Logged
fl*p

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: How to insert new character ?
« Reply #6 on: August 18, 2006, 05:56:39 PM »

We have only one playable charakter too, but 2 NPC's walking around in the scene, at least it is planned to do that.
 

Page created in 0.048 seconds with 21 queries.