Game authors and players, please read this thread!

Author Topic: Scripting trouble  (Read 290 times)  Share 

Bartimaeus

  • When in doubt...Throw it at Rhys.
Scripting trouble
« on: 04 Sep 2005, 15:29 »
Okay here's the end of a  script for an interaction with a door.
It all works but there's just one problem.

  AnimateObjectEx(3,0,50,0,0,eForwards);
  player.x=38;
  player.y=157;
  SetCharacterView(PETER,3);player.loop=0;
  DisplaySpeech(PETER, "How... Unpleasant.");
  AnimateObjectEx(3,1,50,0,0,eForwards);


Right... the player has just done what he needs to do behind the door (Its a cutscene) and the AnimateObjectEx is the door opening for him to come out. Now underneath that I have the player's position and the the view I want it to set for him (his normal, visible, view). The problem is that this isn't happening.
The door closes and the speech is displayed where the player should be but you can't see him.

I used the SetCharacterView earlier for when he enters - it gives him a transparent view - and that works fine, so I don't really know what's wrong.

Help please,

~Billy
« Last Edit: 04 Sep 2005, 15:33 by Billy Gnome Jefferson »
~The more adventures I go on, the more sand I get in my shoes

Khris

  • Evil Dark Emperor Death-Kill
    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Scripting trouble
« Reply #1 on: 04 Sep 2005, 17:30 »
I'm not sure why it doesn't work, but you could set SetCharacterTransparency (or player.Transparency) to 100 to make him invisible, that way you wouldn't have to change the player's view.
http://whathaveyoutried.com/

The other day on yahoo answers:
"Can you print colored images with black ink? If so tell me how please Thanx Kimberly"

Bartimaeus

  • When in doubt...Throw it at Rhys.
Re: Scripting trouble
« Reply #2 on: 04 Sep 2005, 17:55 »
Okay I changed it to the Transparency (which is so much more convenient) but it sill didn't work, but then I took a closer look.
When the dialog was displayed it was fractionally lower down than before he went in.
I took the y variable up one (which ultimately lowers the character) and it worked!
The walkable area is only a few lines wide so thats why its so tight but it's still weird coz i just used the same variables as before.
For some reason my character got bumped up inbetween.

Oh well, problem solved.
Thanks,

~Billy  ;D
~The more adventures I go on, the more sand I get in my shoes

Ashen

Re: Scripting trouble
« Reply #3 on: 05 Sep 2005, 01:24 »
Is it possible there was a problem with the baselines, so the character was being drawn BEHIND the closed door?

I realise it doesn't matter since you've fixed it, I'm just curious.
I know what you're thinking ... Don't think that.

Bartimaeus

  • When in doubt...Throw it at Rhys.
Re: Scripting trouble
« Reply #4 on: 05 Sep 2005, 16:02 »
Well you see the game is 2D, so the player walks on almost a platform.
The walkable area is only about 2 lines thick - which it shouldn't really be.
I thought about it being a baseline problem, but I couldn't seem to move the character either so I ruled that out.

If it was a baseline problem then he would have just walked out from behind the object.

Im pretty sure it was some kind of funky walkable area problem.

 ;D
~The more adventures I go on, the more sand I get in my shoes

Iceboty V7000a

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Re: Scripting trouble
« Reply #5 on: 06 Sep 2005, 02:36 »
A walkable area of 2 lines width is probably too narrow for it to function properly, try widen it and see if that helps.