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: WME_particles query  (Read 4214 times)

0 Members and 1 Guest are viewing this topic.

Mikael

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 127
    • View Profile
    • MDNA Games
WME_particles query
« on: March 25, 2008, 09:25:34 PM »

I know that I'm completely hopeless, but I've been trying to implement an effect from wme_particles into my test project, but without success.

This is how I've done:

1) Copied the whole particles folder to my project.

2) Attached "particles script" to my test scene.

3) Added this script to "scene_init script" in my test scene:
   var Ent = Scene.GetNode("Emitter");
   Ent.MakeRain();

What happens is that I get the message "Call to undefined method 'MakeRain'" when I try to run the scene.

I'm probably missing something very fundemental here.

Thanks in advance!

Mikael
Logged

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: WME_particles query
« Reply #1 on: March 25, 2008, 09:51:27 PM »

you have to attach the script to the entity/region not to the scene

first create a region called "Emitter" in SceneEdit
Attach the particles script to it in SceneEdit

Add like you have done to scene_init:
var Ent = Scene.GetNode("Emitter");
Ent.MakeRain();

i am not sure if MakeRain(); needs some parameters - just look in the particles script for this

it should work ..

stucki

Mikael

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 127
    • View Profile
    • MDNA Games
Re: WME_particles query
« Reply #2 on: March 25, 2008, 10:41:35 PM »

That makes absolute sense.

However, error messages are now all over the place:

22:46: Runtime error. Script 'particles\particles.script', line 130
22:46:   Call to undefined method 'DeleteParticleEmitter'. Ignored.
22:46: Runtime error. Script 'particles\particles.script', line 131
22:46:   Call to undefined method 'CreateParticleEmitter'. Ignored.
22:46: Runtime error. Script 'particles\particles.script', line 135
22:46:   Call to undefined method 'AddSprite'. Ignored.
22:46: Runtime error. Script 'particles\particles.script', line 140
22:46:   Call to undefined method 'SetBorder'. Ignored.
22:46: Runtime error. Script 'particles\particles.script', line 141
22:46:   Call to undefined method 'SetBorderThickness'. Ignored.
22:46: Runtime error. Script 'particles\particles.script', line 168
22:46:   Call to undefined method 'Start'. Ignored.

Am I missing the blindingly obvious here?

Thanks,

Mikael
Logged

Mikael

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 127
    • View Profile
    • MDNA Games
Re: WME_particles query
« Reply #3 on: March 25, 2008, 11:05:28 PM »

Forget the last post! I created a sprite entity instead of a region entity, that was the problem.

It works now, thank you very much.

Mikael
Logged

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: WME_particles query
« Reply #4 on: March 26, 2008, 09:04:09 AM »

sorry if i mislead you .. but i meant the green region entity. this is even better than the yellow sprite entity becuase you can set it as a mask for the particles. just adjust its borders in sceneedit and
set the .UseRegion attribute to true.

 

Page created in 0.016 seconds with 21 queries.