Scripting Tutorial 6 - King of the Hill Gamemode

All Lua scripting topics related to Multi Theft Auto.

Moderators: Moderators, MTA team

Scripting Tutorial 6 - King of the Hill Gamemode

Postby jhxp on Thu Mar 08, 2007 9:55 am

NOTICE: THIS TUTORIAL MAY BE OUTDATED! PLEASE READ: http://forum.mtasa.com/viewtopic.php?f=91&t=22270

A bit of delay, but still - sixth tutorial.

Leave your comments below, as usual ;p
One of the [VCP] leaders // honorary member of =PCP=
Image Image
User avatar
jhxp
Super Moderator
 
Posts: 1368
Joined: Mon Jan 26, 2004 6:51 am
Location: Poland
Gang: VCP/PCP

Postby norby89 on Thu Mar 08, 2007 10:03 am

great, gonna check it in a moment
:d: :i: :s: :g: :r: :a: :c: :e:
Image
User avatar
norby89
Moderator
 
Posts: 900
Joined: Wed Feb 01, 2006 10:55 am
Gang: RaFS

Postby Ace_Gambit on Thu Mar 08, 2007 11:59 am

I can't wait for a team death match game-mode scripting tutorial :P .
User avatar
Ace_Gambit
Experienced
 
Posts: 533
Joined: Mon Dec 25, 2006 12:58 pm
Location: Amsterdam

Postby Wheelburner on Thu Mar 08, 2007 12:03 pm

Cool tutorial 8)
User avatar
Wheelburner
New User
 
Posts: 91
Joined: Mon Jan 29, 2007 8:16 am
Location: Estonia

Postby Raoul on Thu Mar 08, 2007 4:13 pm

Can you make Team-KotH? That would be very nice :D
Image
Raoul
New User
 
Posts: 41
Joined: Mon Dec 25, 2006 11:44 am
Location: Netherlands

Postby Magus1724 on Thu Mar 08, 2007 5:02 pm

Nice gamemode :P
This is gonna be the greatest mod ever, I can't wait 8)
User avatar
Magus1724
Regular
 
Posts: 330
Joined: Wed Jan 17, 2007 12:22 pm
Location: Canada
Gang: KotH

Postby 50p on Thu Mar 08, 2007 7:19 pm

Magus1724 wrote:Nice gamemode :P
This is gonna be the greatest mod ever, I can't wait 8)

This is just the beginning! There are people who will be making more and more complex gamemode!

I love to read every tutorial, and I can't wait to see the list of the functions you have already. Nice tutorial, especially showing that you made something similar to single player's gang war flashing radar! Also increasing weapons damage!

EDIT:
I have noticed that the radar area is a circle-shaped? Coz' the is the actor (player) and when he stands on the corner of the building there is a message that he left the area and his score isn't increasing. Is that a circular shape?
createRadarArea ( X, Y, sizeX, sizeY, R, G, B, A, [ elements visible to ] )

It doesn't look like it is a circle.
User avatar
50p
Veteran
 
Posts: 1787
Joined: Fri Jan 19, 2007 5:55 pm
Gang: Lua Masters :P

Postby [TDH]Boss on Fri Mar 09, 2007 1:05 am

It is not a circle. Building's corners are just not in the zone.

And why grenades still cause "scuicide"? You have player coords, throwing grenade, you have coords the of player, who has died because of explosion, you have (or are able to count) the speed of a grenade. Is it so difficult to calculate who has killed a player with an explosion and give a frag for that? (the same with a hunter)
Image
Image
User avatar
[TDH]Boss
Regular
 
Posts: 122
Joined: Sun Jan 21, 2007 3:51 am
Location: Russia, Moscow
Gang: Team Dies Hard

Postby Ace_Gambit on Fri Mar 09, 2007 3:11 am

Raoul wrote:Can you make Team-KotH? That would be very nice :D


It's not yet revealed but I think scripting teams is nothing more than checking if player x is in column x of the player table. With the code available you can already script a function that does something (or nothing) when players in the same team shoot each other (i.e. auto-kill team killer after x damage or show a warning message).
User avatar
Ace_Gambit
Experienced
 
Posts: 533
Joined: Mon Dec 25, 2006 12:58 pm
Location: Amsterdam

Postby CookieMonster on Fri Mar 09, 2007 5:16 am

pfft.. make your own TDM
CookieMonster
New User
 
Posts: 61
Joined: Sat Feb 11, 2006 8:58 am
Location: uk

Postby kevuwk on Fri Mar 09, 2007 5:28 am

Ace_Gambit wrote:
Raoul wrote:Can you make Team-KotH? That would be very nice :D


It's not yet revealed but I think scripting teams is nothing more than checking if player x is in column x of the player table. With the code available you can already script a function that does something (or nothing) when players in the same team shoot each other (i.e. auto-kill team killer after x damage or show a warning message).


there are functions for teams, so any team related script should be possible, will see if i can persuade the qa team to make a tutorial of a team game soon
Kevuwk
Image
Image
Any comments made are purely my own and do not represent the interests of the MTA Team
kevuwk
The MTA Team
 
Posts: 433
Joined: Wed May 04, 2005 5:08 pm
Location: UK

Postby Ace_Gambit on Fri Mar 09, 2007 6:34 am

That's good to hear. I've been looking forward to see team scripting tutorials :D .
User avatar
Ace_Gambit
Experienced
 
Posts: 533
Joined: Mon Dec 25, 2006 12:58 pm
Location: Amsterdam

Postby 50p on Fri Mar 09, 2007 7:39 pm

[TDH]Boss wrote:It is not a circle. Building's corners are just not in the zone.

I see now. I didn't look properly, the building's edges are not in area, but middle is.

I'd also like to see some 'team' script.
User avatar
50p
Veteran
 
Posts: 1787
Joined: Fri Jan 19, 2007 5:55 pm
Gang: Lua Masters :P

Postby ArmedAndDangerous on Sat Mar 10, 2007 6:51 pm

I was woindering if the camera when used in MP will save the photo taken into the sdmae place is it does in sp?
Raven wrote:I tried setting my hotmail password to penis. It said my password wasn't long enough. Sad


http://gtamp.net/ CLICK HERE TO ACCESS THE BEST MTA:SA SERVER IN THE UNIVERSE.
ArmedAndDangerous
New User
 
Posts: 81
Joined: Wed Jun 29, 2005 6:37 pm
Location: North Wales

Postby erorr404 on Sat Mar 10, 2007 8:35 pm

ArmedAndDangerous wrote:I was woindering if the camera when used in MP will save the photo taken into the sdmae place is it does in sp?

yes
erorr404
Super Moderator
 
Posts: 2052
Joined: Sun Jun 13, 2004 11:28 pm
Location: San Fierro, SA

Next

Return to Scripting

Who is online

Users browsing this forum: 50p and 0 guests