Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » Vetach plugin
Vetach plugin [message #438008] Sat, 16 October 2010 11:29 Go to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
Well I Have made a vtach detach plugin for servers

it has 2 chatcommand keys

VTVTACH
VTDETACH

download link:

http://www.megaupload.com/?d=PFEC7X38


it attaches a vehicle to your apache/orca with !vtach
and it detaches it again with !detach
you can block it with !metach and deblock it with !metach

ps:
its a bit buggy when picking up vehicles after dead and stuff am willing to give code because i cant find the problem myself Sad


Owner of kambot TT server

kambot.freeforums.org

[Updated on: Sun, 17 October 2010 02:32]

Report message to a moderator

Re: Vetach plugin [message #438011 is a reply to message #438008] Sat, 16 October 2010 12:55 Go to previous messageGo to next message
trooprm02 is currently offline  trooprm02
Messages: 3266
Registered: August 2005
Location: Canada
Karma: 0
General (3 Stars)
Please explain what it does or maybe provide a screenshot?

Re: Vetach plugin [message #438033 is a reply to message #438008] Sun, 17 October 2010 01:42 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Post the code. Smile


Re: Vetach plugin [message #438039 is a reply to message #438008] Sun, 17 October 2010 02:36 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
ok these are the scripts

Toggle Spoiler


some bugs i remember:

if you just bought a vehicle and you vtach it without anyone in it it says it attaches a neutral vehicle but the veh doesnt attach

if you bought a vehicle to attach and die sometimes you cant pick it up although he says you do

ps: in plugin harvester pickup is secured


Owner of kambot TT server

kambot.freeforums.org

[Updated on: Wed, 20 October 2010 07:06]

Report message to a moderator

Re: Vetach plugin [message #438051 is a reply to message #438011] Sun, 17 October 2010 09:21 Go to previous messageGo to next message
trooprm02 is currently offline  trooprm02
Messages: 3266
Registered: August 2005
Location: Canada
Karma: 0
General (3 Stars)
trooprm02 wrote on Sat, 16 October 2010 14:55

Please explain what it does or maybe provide a screenshot?



Re: Vetach plugin [message #438052 is a reply to message #438051] Sun, 17 October 2010 09:24 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
trooprm02 wrote on Sun, 17 October 2010 18:21

trooprm02 wrote on Sat, 16 October 2010 14:55

Please explain what it does or maybe provide a screenshot?



ever tried to reread a first post after it was editted


Owner of kambot TT server

kambot.freeforums.org
Re: Vetach plugin [message #438068 is a reply to message #438008] Sun, 17 October 2010 23:13 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
Interesting concept. I like the idea though Thumbs Up

http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
Re: Vetach plugin [message #438073 is a reply to message #438008] Mon, 18 October 2010 04:36 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
yea i releases bcause i hope maybe someone can help me with the bugs Razz.

Owner of kambot TT server

kambot.freeforums.org
Re: Vetach plugin [message #438078 is a reply to message #438008] Mon, 18 October 2010 06:42 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Hmm, your script seems to disable itself if there is a VTOL on the map which is not the one you are driving and is older than any vehicles within 12m of your VT_CarryAll vehicle... (note: BaseGameObjList is NOT in order of distance from the current object, but in order of when they were created)


Specifically this bit;

if(Is_VTOLVehicle(o)||Is_Script_Attached(o,"VT_CARRYALL_ATTACHED"))
				{
					Remove_Script(obj,"VT_CarryAll");
					return;
				}



From what I can see you iterate through EVERY object in the game, so if it hits this one BEFORE it hit's the one which can be attached (ie: within 12m of you) it's going to cancel itself.


http://steamsignature.com/card/1/76561197975867233.png
Re: Vetach plugin [message #438082 is a reply to message #438078] Mon, 18 October 2010 07:51 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
danpaul88 wrote on Mon, 18 October 2010 15:42

Hmm, your script seems to disable itself if there is a VTOL on the map which is not the one you are driving and is older than any vehicles within 12m of your VT_CarryAll vehicle... (note: BaseGameObjList is NOT in order of distance from the current object, but in order of when they were created)


Specifically this bit;

if(Is_VTOLVehicle(o)||Is_Script_Attached(o,"VT_CARRYALL_ATTACHED"))
				{
					Remove_Script(obj,"VT_CarryAll");
					return;
				}



From what I can see you iterate through EVERY object in the game, so if it hits this one BEFORE it hit's the one which can be attached (ie: within 12m of you) it's going to cancel itself.



its supposed to disable itself when it finds a vtol nearby its so you cant attach vtols ^^
the bugs are mainly in the part where it has to identify a driver or neutral vehicle


Owner of kambot TT server

kambot.freeforums.org
Re: Vetach plugin [message #438111 is a reply to message #438008] Tue, 19 October 2010 03:09 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
That check I quoted doesn't check the distance though, so it would appear to disable itself if there is a VTOL anywhere on the map, not just close to you. Perhaps I am just reading it wrong but it seems that way to me.

Might also be an idea to make sure the item to be picked up is actually below you as well, would be funny to see an orca park alongside a medium tank then lol-warp it underneath into bluehell Razz Sensible check might be;

Their X >= Your X-2.5 and <= Your X+2.5
Their Y >= Your Y-2.5 and <= Your Y+2.5
Their Z < Your Z

This forces you to hover almost directly above the unit to be picked up. Also a pickup range of 12 seems quite high to me, I would have thought about 8 would be more realistic.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Tue, 19 October 2010 03:17]

Report message to a moderator

Re: Vetach plugin [message #438115 is a reply to message #438008] Tue, 19 October 2010 07:25 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
As far as I see it, you are right danpaul88.
As soon as the vehicle is a VTOL or the script "VT_CARRYALL_ATTACHED" is attached, the whole scripts stops running. I don't think that was your idea, robbyke

@robbyke: You should implement danpaul's idea on the XYZ check Wink


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg
Re: Vetach plugin [message #438118 is a reply to message #438008] Tue, 19 October 2010 08:51 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
OK ^^ thanks alot guys that fixes a bug indeed.
and about x y z ill try to add it but i think it will make it alot harder to attach a veh. it should stay pretty easy.
ill take a look into it thanks for the hint.
Thumbs Up

ive updated the source check previous post its editted.

only bug ive found is sometimes empty vehicles dont get picked up dont know if it happens wit manned vehicles to cant test that decently


Owner of kambot TT server

kambot.freeforums.org

[Updated on: Tue, 19 October 2010 12:06]

Report message to a moderator

Re: Vetach plugin [message #438127 is a reply to message #438008] Wed, 20 October 2010 03:01 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
From your latest code, just spotted this;

else{return;Remove_Script(obj,"VT_CarryAll");}



The Remove_Script will never be called because it will return first. You should swap the order of these calls around if you want the script to get removed properly. I am a bit surprised the compiler didn't warn you about unreachable code actually...




EDIT;
Also, this check

if (o && As_ScriptableGameObj(o) && Is_Vehicle(o) && o!=obj)


Has a redundant part, a VehicleGameObj is *always* scriptable, so there's no need to test for As_ScriptableGameObj(o). You can safely remove this check to leave you with;

if (o && Is_Vehicle(o) && o!=obj)


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Wed, 20 October 2010 03:03]

Report message to a moderator

Re: Vetach plugin [message #438133 is a reply to message #438008] Wed, 20 October 2010 08:43 Go to previous message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
ok thnx dan only that doesnt changes bug of not being able to pickup empty vehicles it says it attaches a neutral vehicle but the vehicle isnt attached Huh

Owner of kambot TT server

kambot.freeforums.org
Previous Topic: [skin] Doom Door
Next Topic: [Skin] Duke 3D door
Goto Forum:
  


Current Time: Thu Nov 14 01:01:29 MST 2024

Total time taken to generate the page: 0.01303 seconds