[REL] Shooting range target

Scripter or interested in scripting? This place just may fancy to your likings!

Moderators: Game Admins, FM, Lead Admins

Post Reply
User avatar
Private200
Silver Member
Silver Member
Posts: 117
Joined: Thu Feb 11, 2016 10:34 pm

[REL] Shooting range target

Post by Private200 » Mon May 22, 2017 11:31 pm

As shown in this video: https://www.youtube.com/watch?v=qjWWo5ykEVw

Pastebin

Commands:

/createtarget ; /movetarget ; /destroytarget ; /ready (gets you to the shooting range)

Enjoy.

User avatar
Mikee
Wannabe Mafia
Wannabe Mafia
Posts: 249
Joined: Tue Jan 06, 2015 4:57 pm
Location: Italy
Contact:

Re: [REL] Shooting range target

Post by Mikee » Mon May 22, 2017 11:35 pm

Great system! It would be useful!
Mikee
Head of Mikee’s Mapping
Mapper
Junior Scripter
Designer

Support
Send a ticket
Questions / Technical Support
Contact Information
Telegram: @mikeejr
Discord: Mikee#5124
Skype: damiano.nenna1


If you are a mapper and you want to join the Mikee's Mapping Team contact me privately.

Beard
Wannabe Mafia
Wannabe Mafia
Posts: 174
Joined: Fri Sep 02, 2016 6:28 pm
Ingame name: Robert Sheldon
Location: Belgium

Re: [REL] Shooting range target

Post by Beard » Tue May 23, 2017 12:05 pm

A lot of optimization can be done. As of right now it probably works but some of the methods used are deprecated. You should improve OnObjectMoved and change the numerous if () statements used throughout the code.
Image

User avatar
Private200
Silver Member
Silver Member
Posts: 117
Joined: Thu Feb 11, 2016 10:34 pm

Re: [REL] Shooting range target

Post by Private200 » Tue May 23, 2017 2:35 pm

The script was first done in October of last year. Many if statements could have been replaced with loops however, I do not know why I have not done that. The code can still be optimized if you got the basic knowledge required to make the changes. On the other hand, the script works just fine (and it will make an infinite loop until the target is stopped, in difference with the script).

User avatar
Marksman.
- Silver Member -
- Silver Member -
Posts: 527
Joined: Thu May 30, 2013 11:36 pm
Ingame name: Daniel Tucker

Re: [REL] Shooting range target

Post by Marksman. » Tue May 23, 2017 3:14 pm

Is the damage done to the targets seen between players or clientside?

User avatar
Private200
Silver Member
Silver Member
Posts: 117
Joined: Thu Feb 11, 2016 10:34 pm

Re: [REL] Shooting range target

Post by Private200 » Tue May 23, 2017 4:10 pm

Marksman. wrote:Is the damage done to the targets seen between players or clientside?
I am not sure whether the object is synced clientside, however the script itself will destroy the object when a player shoots at it, thus it will also be removed for other players.

User avatar
Marksman.
- Silver Member -
- Silver Member -
Posts: 527
Joined: Thu May 30, 2013 11:36 pm
Ingame name: Daniel Tucker

Re: [REL] Shooting range target

Post by Marksman. » Tue May 23, 2017 4:11 pm

Private200 wrote:
Marksman. wrote:Is the damage done to the targets seen between players or clientside?
I am not sure whether the object is synced clientside, however the script itself will destroy the object when a player shoots at it, thus it will also be removed for other players.
Fair enough, would be great for shoot-offs.

Post Reply

Return to “Scripting Section”

Who is online

Users browsing this forum: No registered users and 1 guest