Author |
Message |
gilder Novice

Age:37 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: Tue Oct 17, 2006 7:20 am Post subject: PlaceBall() in GoalFunc() |
 |
|
|
|
When player scores a goal, GoalFunc is called. Is it possible to warp the same ball in that function?
When ball 0 is scored and i try to warp it with PlaceBall(), nothing happends. If i try same thing with any other ball, ball will get warped. I don't have that warping problem outside GoalFunc. _________________ Hockey Zone |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Tue Oct 17, 2006 10:30 am Post subject: |
 |
|
|
|
/* do callbacks before spawning */
DO_CBS(CB_GOAL, arena, GoalFunc, (arena, p, g->ballid, g->x, g->y));
/* send ball update */
if (bd->state != BALL_ONMAP)
{
/* don't respawn ball */
}
else if (pbd->goaldelay == 0)
{
/* we don't want a delay */
SpawnBall(arena, bid);
}
else
{
/* phase it, then set it to waiting */
phase_ball(arena, bid);
bd->state = BALL_WAITING;
bd->carrier = NULL;
bd->time = TICK_MAKE(current_ticks() + pbd->goaldelay);
} |
_________________ SubSpace Discretion: A Third Generation SubSpace Client |
|
Back to top |
|
 |
gilder Novice

Age:37 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: Tue Oct 17, 2006 2:04 pm Post subject: |
 |
|
|
|
If i understood right, it's not possible warp that ball in GoalFunc.
Is there better way to warp it after scoring than having timer function that will be called every second? |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Tue Oct 17, 2006 4:04 pm Post subject: |
 |
|
|
|
change balls.c and recompile, then post the change to the svn. |
|
Back to top |
|
 |
gilder Novice

Age:37 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: Thu Oct 19, 2006 8:10 am Post subject: |
 |
|
|
|
Only thing that came in to my mind was to move the DO_CBS line last in that function. It didn't work. What did you exactly mean by changing balls.c? Editing or replacing with other balls.c? Also, what is svn? |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Thu Oct 19, 2006 4:24 pm Post subject: |
 |
|
|
|
I apologise for having to ask this, but did you recompile the balls module after you made the change and put it in your bin folder and used the new one by editing modules.conf?
subversion(svn) is a version control system, which is basically a way of organizing a large progamming project so multiple people can easily work on it (the project is asss, in this case). |
|
Back to top |
|
 |
gilder Novice

Age:37 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: Fri Oct 20, 2006 5:43 am Post subject: |
 |
|
|
|
Looks like i have a lot to learn now.
How do i recompile a core module? Do i have to do own project for it and then include balls.c and balls.h in it? There's no balls.dll, so what file is that module in?
How do i send version number to subversion? If i edit balls module, will it be a problem, if i make the module for someone's zone?
I didn't find information in dev guide or in asss wiki after a short search. |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Fri Oct 20, 2006 1:26 pm Post subject: |
 |
|
|
|
Yeah make your own project with balls.c and balls.h (you may also need util, which needs to link to pthreads). You make balls.dll as normal, then in modules.conf change the line:
balls
to
balls:balls
as written in modules.conf, modules without a preceeding .dll file are compiled right into the executable. Another resource you might use is arnk's vs.net build of asss: https://forums.minegoboom.com/viewtopic.php?t=6519.
When distributing, you'll need to distribute your balls module with whatever module you're making, or it won't work... As for the subversion thing, I dunno  |
|
Back to top |
|
 |
gilder Novice

Age:37 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: Fri Oct 20, 2006 2:06 pm Post subject: |
 |
|
|
|
Making my own balls module went fine and PlaceBall() works now. Thanks!
Where i need arnk's asss build? |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Fri Oct 20, 2006 7:33 pm Post subject: |
 |
|
|
|
you don't need it, it's just helpful for certain modules cause it has everything you need. |
|
Back to top |
|
 |
|