Author Topic: Procedures called when?  (Read 1269 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Procedures called when?
« on: May 27, 2007, 05:53:30 pm »
I am in need of a list of the procedures and when each is called (mostly needed is b4 or after)
Although I just learned that OnLeaveGame isn't called when a player is disconnected. Things like this would be useful to know.
(Its just that I'm to lazy to go 1 by 1 figuring out when each is called by testing)

Is OnJoinGame called before a player selects a team?

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: Procedures called when?
« Reply #1 on: May 27, 2007, 06:09:04 pm »
OnJoinGame is called after a player selects a team I suppose, because it gives u the team as a parameter.
urraka

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Procedures called when?
« Reply #2 on: May 27, 2007, 06:12:03 pm »
plus technically one isn't "in the game" until they're on a team.  Now if it was called OnJoinServer or OnServerConnect, then I'd imagine it would be before joining a team... but it isn't ;)

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Procedures called when?
« Reply #3 on: May 27, 2007, 06:19:19 pm »
I would really love having those because I was thinking of an auto-team balancer based on more than just number of players on the team.
(Idea was for my Team King of the Hill server, so I can have it automatically change you to the team with more time needed twards victory if the teams are even... that would be sooo sweet)

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Procedures called when?
« Reply #4 on: May 27, 2007, 09:29:09 pm »
http://enesce.com/help/
Read the damn manual.

It has a list of each 'event', and tells you when they are called in the description.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Procedures called when?
« Reply #5 on: May 27, 2007, 09:34:47 pm »
http://enesce.com/help/
Read the damn manual.

It has a list of each 'event', and tells you when they are called in the description.
Last I checked it does NOT say if it is before or after that event happens.
Also, OnLeaveGame does not mention that it is not called when a player disconnects. (So somebody else said, never tested.. sorry if incorrect)

Its these things I'm interested in man. And why do you have to be so aggressive when you post against me (and others)? You really should stop using the word damn when you say "read the damn manual" to people so they don't become upset as I am with you. You still can if you wish, it is only a request / suggestion.
« Last Edit: May 27, 2007, 09:38:51 pm by DorkeyDear »

Offline cynicle

  • Major(1)
  • Posts: 37
Re: Procedures called when?
« Reply #6 on: May 29, 2007, 08:52:57 pm »
I know what your on about Dorkey. I tried writing a similar script yesterday and placed it under OnJoinGame but It didn't work untill I moved it to OnJoinTeam.
My reccomendation is (although im new to all this stuff) place a script under OnJoinTeam which calculates which team needs them and then switches them to that team.

Command('/SETTEAM5 ' + inttostr(ID));
//Spectators Need this player :)

Will mean they choose a team and end up on another one but its the best I can think of.
Join the Army. Visit strange and exotic places. Meet fascinating people. And kill them.

Aus Soldat League 203.208.70.216:23073