Page 1 of 1

New Game Mode: Need Help!

Posted: Sat May 29, 2010 9:10 pm
by SW_elite
This new gamemode that I've come up with is a king of the hill style mode for my map. I'm looking for help because I don't know where to start.

For instance. I want the mode to have unlimited reinforcements, no AI bots, and a bar running across the top of the screen that keeps score. The way that you score is from what I think, gonna be the tricky bit. I want you to have to be in a region to score points for you team. The points go up about 1 every second, and if both teams are in the region, then neither team scores. As soon as the score reaches, say around 300, then the game ends.

If at all, how can this be done!

EDIT: Please, anyone at all, even if it's the tinyest thing. I really need help!

EDIT 2: Just an update, I know how to make sure there aren't any AI on the map, so I dont need help with that anymore.

Re: New Game Mode: Need Help!

Posted: Sun May 30, 2010 7:15 am
by [RDH]Zerted
The bar running across the top might be hard to do. It would be easier to simple use the team points counters.

You want to use OnEnterRegion and OnLeaveRegion to track what players are inside your score region. When only one team is in the region, start a repeating 1 second timer to increase the score. When two team are in the region, stop the timer. Also when one team leaves either stop the stop (if no ones is left inside) or start the timer (if there is now only one team left inside).

Another Question...

Posted: Tue Jun 01, 2010 2:22 am
by SW_elite
Thanks for the reply... For the bar running across the top, it is the normal counter I want, I just dont know how to configure it so that it counts the score instead of the reinforcements... As for the scripting I need to do, I'm gonna need some help with it.

I thought you were the one that was going to reply...

EDIT: This is what I came up with! I'm sure there are mistakes in there because I've never done scripting before.
This piece of script is meant to activate the region, then create the timer, set the timer value, and then
when the player enters the region, the timer starts.

Code: Select all

ActivateRegion("koth_region")
    CreateTimer (timer1)
    SetTimerValue (timer1, 1)
testfunction = OnEnterRegion(
    function(koth_region, player)
       if (player) EnterRegion
           StartTimer (timer1)
       end
    end,
"koth_region"
)

EDIT
From my earlier question, how can you set up a region so that when you stand in it you gain points for your team?

Also how can you configure the reinforcment counter to count the points that you score from standing in the region?

These are the two questions I really need answerd...

Code: Select all

This is what Zerted told me to do:

You want to use OnEnterRegion and OnLeaveRegion to track what players are inside your score region. When only one team is in the region, start a repeating 1 second timer to increase the score. When two team are in the region, stop the timer. Also when one team leaves either stop the stop (if no ones is left inside) or start the timer (if there is now only one team left inside).

But I dont have a clue how to do it...
Topics merged -Staff

EDIT
How can you set up a region that displays a message when you enter it, like, "You have entered the region".

Also how can you get that same region to display a different message saying "You have left the region", when you leave the region?




@ The Staff - Please don't merge this topic to my other one... That one aint gettin any replies...

Too bad. Don't expect quick answers. People do this in their free time. Why should they spent it helping you instead of doing things helping themselves? -Staff

Re: New Game Mode: Need Help!

Posted: Tue Jun 01, 2010 7:58 am
by lucasfart
No offense SW_Elite, but i really think you should get a firm grasp of the basics before you move onto game modes. If you're not sure how to add unlimited ai, i'd suggest going through the faq/doing a search. Also, i'm not sure if he released anything on it, but Rep made a KOTH mode for his Battle Arena map, which works pretty well.......

Explanation???

Posted: Wed Jun 02, 2010 2:35 am
by SW_elite
Can some please explain this in as much depth as possible?

Code: Select all

ActivateRegion("regionname")
testfunction = OnEnterRegion(
   function(region, player)
      if [whatever callbacks you want] then
         whatvever you want to happen
      end
   end,
"regionname"
)

Re: New Game Mode: Need Help!

Posted: Wed Jun 02, 2010 8:41 am
by DarthD.U.C.K.
i agree with lucasfart, you cant just make a new gamemode without even knowing a bit of lua coding/syntax....
if you want somebody to do it for you, you can ask for that in the requestthread

Re: New Game Mode: Need Help!

Posted: Wed Jun 02, 2010 5:58 pm
by SW_elite
Yeah, even though I could get someone else to do it for me,I'd rather do it myself so that I learn something from it. But thatks anyway.

Re: New Game Mode: Need Help!

Posted: Wed Jun 02, 2010 9:17 pm
by Teancum
It's not so much that nobody wants you to learn -- it's more that you have to walk before you can run kinda thing. Release a map or two before you get into coding like this. Your first map should be simple and straight forward, having solid gameplay instead of gimmicks.

Re: New Game Mode: Need Help!

Posted: Thu Jun 03, 2010 1:07 am
by SW_elite
Shoot! That just blew my plans out of the water! I planed on having a spectacular first map... :( But I definatly undersatand what your saying, and I can't argue with it, not that I was going to though...

I suppose my first map will be alright, as long as I put enough effort into it! But, after the first few maps, I'm still gonna be going to the new gamemode!

Re: New Game Mode: Need Help!

Posted: Thu Jun 03, 2010 8:28 am
by Eggman
There's no reason you necessarily have to release everything you make. I'd say take Teancum's advice, but replace "release" with simply "make." Nobody has a spectacular first map. A first released map can be great, but generally the author will have gone through a lot of practice maps before then.

Start small, and progress by steps: first develop your skills with the terrain tool, then object placement, then planning/barriers...and work your way up to editing the scripts of existing modes for your map - adding command posts, changing the team setups, creating scripted events - until you have the necessary knowledge to create a new mode from scratch.

Edit: Keep in mind that maps don't need lots of extra scripting or new modes to be spectacular. I always enjoy a good conquest match on a solid map.

Re: New Game Mode: Need Help!

Posted: Thu Jun 03, 2010 8:42 am
by SW_elite
Im not that noobish

Re: New Game Mode: Need Help!

Posted: Thu Jun 03, 2010 1:03 pm
by DarthD.U.C.K.
who said you were noobish?

Re: New Game Mode: Need Help!

Posted: Thu Jun 03, 2010 5:54 pm
by myers73
there is nothing noobish about having stock game modes.

Re: New Game Mode: Need Help!

Posted: Thu Jun 03, 2010 6:18 pm
by lucasfart
What you have to understand is SW_Elite, we're not trying to stop you from doing this, we're just suggesting that it might be a bit hard if you don't have a firm grasp of lua. And it is not "noobish" to release a first map without custom modes. Just have a look at my Dagobah map. I don't really consider it or myself to be "noobish", and yet it has no added modes.......

Go ahead and do this if you realy want, we'll still help you, but its probably easier for both you and us if you know what you're doing before you start.....

Please don't take my post offensively, i'm just trying to help, ok?

Re: New Game Mode: Need Help!

Posted: Thu Jun 03, 2010 6:33 pm
by SW_elite
Yeah, I don't take any offence, but that same mesage got through to me when Mav said what he said... So im not gonna do the gamemode untill I can almost understand how to do it all myself... That was it's easier on everyone...