PLUGIN: Fire plugin (2005-06-05)

Started by Kweepa, Wed 05/05/2004 23:31:53

Previous topic - Next topic

.M.M.

#40

When I have in my script

FireAddObject(TORCH, 67, 68);

AGS announced error:"FireAddObject is allready compiled". What does it mean and what I have to do?

seraphimdreamer777

#41
I've got a question about the plugin can it be used on objects the player picks up or just background objects cause I want to use it for an inventory item in my game called the fire starter stone.

EDIT: I think I've answered my own question but I'm getting the same error message the guy who posted right above me got "FireAddObject is allready compiled" so I don't know what I'm doing wrong

EDIT2:Sorry I wasn't more specific above but I put this under room load on line 26

int FireAddObject(int object, int seedSprite, int paletteSprite);

int FirePreHeat(int object);

int FireDisableSeeding(int object);

int FireEnableSeeding(int object);

int FireSetStrength(int object, int strength);

int FireRemoveObject(int object);

int FireUpdate();

int FireStop();

Call FireAddObject (in the player enters room) with an object number, a seed sprite number, and a palette sprite number, e.g.

FireAddObject(OBJECT_TORCH, GetObjectGraphic(OBJECT_TORCH), SPRITE_FIREPALETTE);

I also tried using numbers in place of certian words such as

int FireAddObject(int 5, int 7, int 10);

but that didn't work either thanx ahead of time for any help!
Victory is my destiny

.M.M.

Quote from: seraphimdreamer777 on Fri 25/04/2008 12:05:46
I think I've answered my own question but I'm getting the same error message the guy who posted right above me got "FireAddObject is allready compiled" so I don't know what I'm doing wrong
I solved it already.
in after fade- in:
Code: ags
 FireAddObject (1,10,12);  

in repeatedly execute
Code: ags
 FireUpdate (); 

When you use int you are defining or importing some variable.

seraphimdreamer777

#43
Thank you I'm no longer getting the error message but I still have one problem my sprite isn't lighting could it be because of the shape of it or something in my script still if I figure it out I'll let y'all know oh and here is my room script in case y'all need it thanks again

// room script file

function room_Leave()
{

}

function room_LeaveRight()
{






}

function room_Load()
{
  FireAddObject(0, 48, 49);
 
  FireSetStrength(0, 120);
 
  FirePreHeat(0);
}




function room_AfterFadeIn()
{

}

function room_RepExec()
{
  FireUpdate();
}

EDIT:Does this plugin work with 3.0.1 cause if not that could be my problem

EDIT2: I figured it out every thing should have been under function room_AfterFadeIn
Victory is my destiny

.M.M.

I had no problem with it in AGS 3.0.0 (with plugin, not with your script). Maybe... erase
Code: ags
 FirePreHeat(0); 

Gold Dragon

I have tried and tried and tried to read up on this mod to get it to work and I just can't seem to get it to work. Every one says they got it solved but aren't exactly saying how they did or I"m not understanding it.

this is what I have done so far.

*I've copied AGS_Fire.dll file and put it in my Adventure Game Studio 3.0.1 folder

*I have put the code in the Globalscript.ash

// Main header script - this will be included into every script in
// the game (local and global). Do not place functions here; rather,
// place import definitions and #define names here to be used by all
// scripts.
import int FireAddObject(int object, int seedSprite, int paletteSprite);
import int FirePreHeat(int object);
import int FireDisableSeeding(int object);
import int FireEnableSeeding(int object);
import int FireSetStrength(int object, int strength);
import int FireRemoveObject(int object);
import int FireUpdate();
import int FireStop();

*in the room code I put

/ room script file
function room_AfterFadeIn(){
  FireAddObject(0, 6, 7);
  FirePreHeat(0);
  FireDisableSeeding(0);
  FireEnableSeeding(0);
  FireSetStrength(0, 25);
  FireRemoveObject(0);
  FireUpdate();
 
}

*Room compiles and everything.. then when when the room fades in I get "Error:unable to create local script: Runtime Error: unresolved import 'FireAddObject'

what am I doing wrong.. can some plz give me a step by step way of how to use this wonderful mod.

Sometimes I'm slow at understanding things. but when I get it.. I get it
Want to see how I am doing and how far I've gotten in my game? Visit my forum  http://www.freepowerboards.com/DragonKnight

Pumaman

Did you actually enable the plugin? Just copying it to the AGS folder isn't enough, you then need to right-click it and enable it under "Plugins" in the project tree.

Gold Dragon

no I didn't...


ok enabled it... but still not working.. but at least I don't have any more error messages. I'll play around with the code a bit more and see if I can get it to work
Want to see how I am doing and how far I've gotten in my game? Visit my forum  http://www.freepowerboards.com/DragonKnight

Gold Dragon

ok no errors.. but still no action

I've.....

*enabled the plugin

*put the code in my room script

    function room_AfterFadeIn(){
         FireAddObject(0,6,7);
         FireEnableSeeding(0);
         FireSetStrength(0, 100);
         FirePreHeat(0);
         FireUpdate();

    }

    function repeatedly_execute_always(){
        FireEnableSeeding(0);
        FireUpdate();
    }


But still no fire WTH! =(
Want to see how I am doing and how far I've gotten in my game? Visit my forum  http://www.freepowerboards.com/DragonKnight

Cogliostro


I can get the fire module to work just fine with a 16-bit game, but I love transparent PNG images and those only work with 32-bit games and so far I have been unable to get the FIRE PLUG IN to work with the 32-bit game.  Have I just screwed up my images and it really should work? Is there a newer version?

On a similar note, does anyone have a copy of the ParticleSystemManager v1.01 - I tried to download it and couldn't find one anywhere.

Thanks,
Cogliostro
"First things first, but not necessarily in that order." - Dr. Who

san.daniele

#50
Quote from: Cogliostro on Thu 07/03/2013 14:24:29

I can get the fire module to work just fine with a 16-bit game, but I love transparent PNG images and those only work with 32-bit games and so far I have been unable to get the FIRE PLUG IN to work with the 32-bit game.

sorry for digging up this old tread (at least the last post isn't that old). People might like to know that it works just fine in AGS 3.2 (and yes, even in 32-bit games. actually, the seed-sprite i used is only 16-bit … maybe that made the difference as seed/palette-sprite should have the same colour depth according to documentation and I used the palette included in the zip).

p.s. wonderful plugin!

SMF spam blocked by CleanTalk