[XP] Issue with Particle Effects engine

Started by MindOnFire, September 19, 2011, 01:45:34 am

Previous topic - Next topic

MindOnFire

September 19, 2011, 01:45:34 am Last Edit: September 19, 2011, 01:56:23 am by MindOnFire
Was told to post my project and the issues I'm having here. I literally just started it a couple of hours ago and am trying to get some scripts in it. Right now it has the default map and 2 events on the page, which you can look at in the project file. One's blank with a character graphic and the other is a gray tile which is action based and contains the script I thought would activate a random particle effect (just so I could get it working. I actually worked through five or 6 errors on my own before I finally got stopped here. And all it is is me trying to figure out what the hell I'm supposed to type in to select one of the particle effects in the script. I tried typing the various names it game me and it simply doesn't seem to work. I must be doing something wrong as I know the engine works from seeing other projects use it.) I have the graphics for it as well.

There are some other codes implemented but they shouldn't really affect this since they're just codes for modifying the save screen and adding pause functionality/shadows. Oh, and one for updating the character sprite depending on equipment but that's been untouched since I pasted it in. I copied the audio folder from a blank project since I haven't used anything I had in the folders yet and it would have brought the size of the upload up needlessly by about 245 mb.

I'm intending to use particle effects for blood if possible, flames, and basically just some weather effects (think the world map in Chrono Trigger's 2300 A.D.)

Here's the download link for the project. Just try running it first and you'll see the error message that I get. It doesn't tell me to refer to a specific line in the code, though the name in the error changes along with any particle effect in the default script that I try to reference in the event.

http://www.4shared.com/file/kkLG8Kvd/Particle_Engine_Project.html




EDIT: I accidentally submitted this without tagging on the upload :facepalm:, gimme a minute.

EDIT 2: Fixed topic title and added the download link.

EDIT 3: If anyone would like to take a look at this without downloading the project, I'll post the code, as well as what I have in the event, and a screencap of the error message tomorrow. It's not a big file though.
Then.
Now.
Forever.

ForeverZer0

September 19, 2011, 02:00:24 am #1 Last Edit: September 19, 2011, 02:07:27 am by ForeverZer0
I'll look, but if it doesn't have a line and file, 9/10 it is from a script call in an event. The only other way I've seen it is when the eval() method is used.

EDIT:
Yep, its your script call.

$scene.effect(001, blue, event, 9, 6)


First, 001 can be just 1, though it doesn't hurt anything. blue and event are not defined. They need to be written as strings, within quotes . Like this:

$scene.effect(001, 'blue', 'event', 9, 6)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

AliveDrive

F0 would also like to take this time to tell you all about Dropbox. :V:
Quote from: Blizzard on September 09, 2011, 02:26:33 am
The permanent solution for your problem would be to stop hanging out with stupid people.

MindOnFire

Haha. I already use 4Shared for most-everything I upload that isn't a photo and I haven't ever had a problem with it. But I can look into dropbox in the morning, for sure.

And yes, I'm pretty sure that whatever I'm doing wrong is in the event as his instructions in the script aren't the best at points.
Then.
Now.
Forever.

ForeverZer0

I solved it, but I edited the above post. You all posted while I did. If you do look into dropbox, you must use link from my sig, since I solved problem. ;)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

MindOnFire

Ah, thank you very much. I feel like a total tool that it was something that basic haha. And I'll go from your sig, for sure :D

glad it wasn't a hard problem to fix. I just figured the half quotes were on there for the sake of it being an example. Like I said, I'm a scripting noob, and the last/only thing I ever worked with was java where that wasn't used within code too often, unless I was trying to get a message to display.

Again, thanks for the help. Greatly appreciated.
Then.
Now.
Forever.

AliveDrive

Quote from: Blizzard on September 09, 2011, 02:26:33 am
The permanent solution for your problem would be to stop hanging out with stupid people.

MindOnFire

September 19, 2011, 02:27:42 am #7 Last Edit: September 19, 2011, 02:34:20 am by MindOnFire
Quote from: AliveDrive on September 19, 2011, 02:16:14 am
Herobiscuit xD


That was my placeholder since I couldn't think of a real name yet :haha:

Now I'm noticing that that script I used doesn't seem to actually do anything. Calling the effect doesn't seem to actually perform anything, even if I switch the effect. Any idea what could be causing that? The script itself no longer causes the gamefile to crash, which is a good thing.

EDIT: Never mind, I'm just not allowed to try and code at 3:30 am. I'm an idiot and forgot that the 'event' text was part of the script and swapped it for the number 1 :facepalm:

Everything's working fine now. :)
Then.
Now.
Forever.

AliveDrive

When I made the edit F0 suggested and pressed the action key while standing on the gray event it worked fine for me.
Quote from: Blizzard on September 09, 2011, 02:26:33 am
The permanent solution for your problem would be to stop hanging out with stupid people.

MindOnFire

September 19, 2011, 02:37:54 am #9 Last Edit: September 19, 2011, 03:03:11 am by MindOnFire
Yeah, just take a look at my edit and you'll see where I screwed up lol.

EDIT:

Soooo... I guess I'm not done yet. What I've added is pretty basic, and yet RMXP can't seem to handle it. It works fine as an action key event but if I try to make it a parallel process I get the following error message:

QuoteNoMethodError occurred while running script.

undefined method 'effect' for #<scene_title:0x1648c60>


It's on a separate event. And like I said, the script works just fine as an action event and follows the instructions in the code as well as what I was given by F0.

Here's my script event:
Quote$scene.effect(004, 'fire', 'event', 8,
3)


>_<
Then.
Now.
Forever.

ForeverZer0

The script is written poorly.
If its in a parallel event, use this:

if $scene.is_a?(Scene_Title)
$scene.effect(004, 'fire', 'event', 8,
3)
end


You're trying to call a method from Scene_Map on the title screen, which is a different scene. This is one reason why calls directly through the global variable $scene are a bad idea.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

MindOnFire

September 19, 2011, 12:06:31 pm #11 Last Edit: September 19, 2011, 12:10:50 pm by MindOnFire
Okay, thank you very much, I'll have to keep this saved somewhere so that I can remember where the issue lies. I'll give it a run and let you know of my findings. If I can get this to work the only other thing I intend to implement for it right now is a system utilizing one of the effects on a character whenever they take damage; I've not figured out how to do that via event yet but I will in a bit.

It might also be worth noting that I've since implemented Blizz ABS.

EDIT: This will probably sound a bit silly, but what am I supposed to put in place of (Scene_Title)? Is this the map name, event name, or what? I'm still kinda poor at this and the biggest thing I took from that was that using the variable $scene is going to run me into a few walls. I'm also just having my coffee and haven't been up that long, lol.
Then.
Now.
Forever.

ForeverZer0

Oops. I messed up. It should be Scene_Map, not Scene_Title. Sorry 'bout that! Use this:

if $scene.is_a?(Scene_Map)
$scene.effect(004, 'fire', 'event', 8,
3)
end
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

MindOnFire

Ah, thank you. :^_^':

And I just tested this, it works fantastically! Thank you very much for all of your help, guys. I massively appreciate it. :)

Then.
Now.
Forever.