Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Icey on Fri 08/02/2013 19:57:10

Title: Problem with custom functions.[Solved]
Post by: Icey on Fri 08/02/2013 19:57:10
Everything seems to work fine but I just can't get my custom functions to work with objects in rooms. I've never tried so many work around before when it came to one thing before I just tried something else or asked for help. I've tried so many thing and changed many things but still I get nothing. However when when I take the chunk of code and place within another function it works just how I need it but it's not ment to be there so I can't leave it plus I can't ignore the other problem.

Basically I have a action command that is called in battle, if you have the Magic commands set under the battler it should get called. Everything works fine except for where object
Title: Re: Problem with custom functions.
Post by: Khris on Fri 08/02/2013 21:35:48
You defined the functions in the HEADER.
Move them to S3.asC

As for what's wrong with your code, are you sure you've set JoltCOM1 correctly?
Title: Re: Problem with custom functions.
Post by: Icey on Fri 08/02/2013 23:38:40
Ok, and yep, I'm trying to follow everything you said from previous topics and also make sure I have everything set up. So I created a checker that would tell you what ability is set to each slot. I.e DaveCOM1, DaveCOM2, ToriCOM4, etc.

So I put this in the header?

Code (ags) Select
import function FadingMessage(int x, int y);
import function Party_death();

import function DaveAttack();



import function DaveCast1(String text);
import function DaveCast2(String text);
import function DaveItem(String text);
import function DaveAssault(String text);
import function JoltAttack();
import function JoltCast1(String text, int W, int Z);
import function JoltCast2(String text, int W, int Z);
import function JoltItem(String text);
import function JoltAssault(String text, String);