Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Walking on water in Project Joe  (Read 4230 times)

0 Members and 1 Guest are viewing this topic.

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Walking on water in Project Joe
« on: January 17, 2008, 01:46:58 PM »

Hi, I see in Project Joe, in the bathroom, when the main character walks on the water puddle, an effect of water moving like circles appear next to his feet.

How did they do this effect???

Is the particle generator or is a sprite?

How can do to place the water moving effect just in the place when his foot had touch?
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Walking on water in Project Joe
« Reply #1 on: January 17, 2008, 01:54:25 PM »

Project Joe is using a very old version of wme which didn't have particles. So the only way would be sprites.

You can, at any time, query the position of the the character with the attributes Actor.X & Actor.Y
Logged
fl*p

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Re: Walking on water in Project Joe
« Reply #2 on: January 17, 2008, 02:44:13 PM »

Ok, in that case I think that the Scene generates a new entity in each frame of the character that his foot is touching the area of water.

If this is the way, how can I know the frame of the character that his foot is touching the area?

Code: [Select]

on "ActorEntry"
{
  sprite = actor.GetSpriteObject();

  if (sprite.GetFrame(3))
  {
     Scene.CreateEntity("whater");
     var whater_effect = Scene.GetNode("whater");
     whater_effect.SetSprite("sprites\whatereffect.sprite");
     whater_effect.X = actor.X - 5;
     whater_effect.Y = actor.Y + 20;
     whater_effect.Active = true;
  }
}


Is that code true? I think that it only creates the entity at first time that actor enters in the region because the low level function is "ActorEntry", I need that this code will running ever when the actor is in the region. How can I do that?

Then, I want to delete this Entity when the animation is finished, how can I do that?
« Last Edit: January 17, 2008, 03:00:48 PM by lacosaweb »
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: Walking on water in Project Joe
« Reply #3 on: January 17, 2008, 03:08:21 PM »

on "ActorEntry"
{
  this.AttachScript("Path to infinite loop file");
}

infinite loop as:

while(1)
{
  // do your effects here
}

and on "ActorLeave" detach the script.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Walking on water in Project Joe
« Reply #4 on: January 17, 2008, 03:21:27 PM »

hmm, there is much more intelligent solution though. You can easily throw an event on the sprite frame (see the sprite edit chapter in the book, it's basically the same as the footstep checking and if you're going to have footsteps you will need it anyway).

then have a on "footstep" event which will check the region's you're standing in property and if it's water, you run your effect.

See this for a better reference.

http://wiki.dead-code.org/wakka.php?wakka=FootstepSounds&v=16rd

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

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Re: Walking on water in Project Joe
« Reply #5 on: January 17, 2008, 04:18:28 PM »

Thanks a lot!
Logged
 

Page created in 0.031 seconds with 19 queries.