Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: How to change actor3D during game?  (Read 2992 times)

0 Members and 1 Guest are viewing this topic.

redfox

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 122
    • View Profile
How to change actor3D during game?
« on: September 12, 2007, 08:58:46 PM »

During Gameplay, I would like to change the
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 change actor3D during game?
« Reply #1 on: September 12, 2007, 09:12:50 PM »

I tried to unload the actor object, before loading the new, but it didn’t seem to work.
Code: [Select]
Game.UnloadObject(actor);
In what way it didn't seem to work? It should work..
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

redfox

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 122
    • View Profile
Re: How to change actor3D during game?
« Reply #2 on: September 12, 2007, 10:02:54 PM »

The actor didn't seem to be unloaded, and continued to display on screen. As far as I can tell from examples and the help files, the code line should have worked? I get a script error.

Code: [Select]
Game.UnloadObject(actor);
When I then call a new version of actor to be loaded, as show above, I have 2 actors appear on screen. The new and the old are displayed... Confusing...
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: How to change actor3D during game?
« Reply #3 on: September 12, 2007, 10:05:05 PM »

post your script error.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

redfox

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 122
    • View Profile
Re: How to change actor3D during game?
« Reply #4 on: September 12, 2007, 10:18:40 PM »

I think I have fixed it, still using the unload object code. It seems my actor wasn't unloading just before a change scene. It left the old version of actor behind, which was re-displayed upon returning, along with the new version. Most strange!

I was getting this error when loading a new actor, which I normally see if the actor was missing, rather than when having 2 of them.

Runtime error. Script 'scenes\room1\scr\scene_init.script', line 28
Call to undefined method 'SkipTo'. Ignored.


But all is working now, Thanks for the help.  :)
Logged
 

Page created in 0.04 seconds with 24 queries.