Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
PlaceBall() in GoalFunc()

 
Post new topic   Reply to topic Printable version
 View previous topic  ASSS Reference Documentation Post :: Post Brand new AS3 installation on brand ne...  View next topic  
Author Message
gilder
Novice


Age:37
Gender:Gender:Male
Joined: Sep 02 2006
Posts: 35
Location: Finland
Offline

PostPosted: Tue Oct 17, 2006 7:20 am    Post subject: PlaceBall() in GoalFunc() Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Oct 17, 2006 10:30 am    Post subject: Reply to topic Reply with quote

Code: Show/Hide
/* 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
View users profile Send private message Add User to Ignore List AIM Address
gilder
Novice


Age:37
Gender:Gender:Male
Joined: Sep 02 2006
Posts: 35
Location: Finland
Offline

PostPosted: Tue Oct 17, 2006 2:04 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Oct 17, 2006 4:04 pm    Post subject: Reply to topic Reply with quote

change balls.c and recompile, then post the change to the svn.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
gilder
Novice


Age:37
Gender:Gender:Male
Joined: Sep 02 2006
Posts: 35
Location: Finland
Offline

PostPosted: Thu Oct 19, 2006 8:10 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Thu Oct 19, 2006 4:24 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address
gilder
Novice


Age:37
Gender:Gender:Male
Joined: Sep 02 2006
Posts: 35
Location: Finland
Offline

PostPosted: Fri Oct 20, 2006 5:43 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Fri Oct 20, 2006 1:26 pm    Post subject: Reply to topic Reply with quote

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 icon_cool.gif
Back to top
View users profile Send private message Add User to Ignore List AIM Address
gilder
Novice


Age:37
Gender:Gender:Male
Joined: Sep 02 2006
Posts: 35
Location: Finland
Offline

PostPosted: Fri Oct 20, 2006 2:06 pm    Post subject: Reply to topic Reply with quote

Making my own balls module went fine and PlaceBall() works now. Thanks!

Where i need arnk's asss build?
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Fri Oct 20, 2006 7:33 pm    Post subject: Reply to topic Reply with quote

you don't need it, it's just helpful for certain modules cause it has everything you need.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 56 page(s) served in previous 5 minutes.

phpBB Created this page in 0.507686 seconds : 34 queries executed (83.7%): GZIP compression disabled