Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Vehicle Poke Help
Vehicle Poke Help [message #445681] Mon, 11 April 2011 19:16 Go to next message
cpjok is currently offline  cpjok
Messages: 425
Registered: September 2007
Karma: 0
Commander
maybe a weird question

ok what script do i use to make a vehicle spawn in secific are facing a specific way

when you poke a generetic switch

i tried

JWF_Preset_Buy_Poke

but you can only set location not facing of the vehicle so it dont create it in a wall or something
Re: Vehicle Poke Help [message #445691 is a reply to message #445681] Tue, 12 April 2011 09:10 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

This is how you set that script up, it is the right one btw.

Preset_Name: the veh you want it to buy like mine is CnC_GDI_MRLS1
Cost: the amount of money you want it to take from the player that buys one.
location: put a daves arrow on your map face it the way you want it, and copy the x,y,z and put it in the script.
Player_Type: 1 for gdi 0 for nod and i think it's 2 for un teamed not for sure...

If your still having problems let me know and i will help you more.

and far warning if you set the cost to 0 it can be spammed and there could be like 30-40 vehs there in secs so be careful...

And for everyone else that may come on here and say no use the veh buy script that one does not work the way he wants it to.


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: Vehicle Poke Help [message #445693 is a reply to message #445681] Tue, 12 April 2011 09:44 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
How does copying the position of a daves arrow help him rotate it? Facing and position are two separate things...

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

[Updated on: Tue, 12 April 2011 09:46]

Report message to a moderator

Re: Vehicle Poke Help [message #445699 is a reply to message #445681] Tue, 12 April 2011 11:21 Go to previous messageGo to next message
Altzan is currently offline  Altzan
Messages: 1586
Registered: September 2008
Location: Tennessee
Karma: 0
General (1 Star)
You can't have it spawn directly at an object's location using its ID? I don't remember, its been awhile.

I cannot imagine how the clockwork of the universe can exist without a clockmaker. ~Voltaire
Re: Vehicle Poke Help [message #445703 is a reply to message #445681] Tue, 12 April 2011 14:11 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
Altzan wrote on Tue, 12 April 2011 11:21

You can't have it spawn directly at an object's location using its ID? I don't remember, its been awhile.


yes you can with a different script.


Something like this should work hasn't been tested. We use a dummy object on the map to get spawn location and the facing.

void JFW_Preset_Buy_Poke2::Poked(GameObject *obj,GameObject *poker)
{
	const char *preset = Get_Parameter("Preset_Name");
	int x = Get_Int_Parameter("Player_Type");
	int cost = Get_Int_Parameter("Cost");
	int z = Get_Int_Parameter("LocationObject_ID");
	if (!z) { return; }
	if (CheckPlayerType(poker,x)) {return;}
	if (cost <= Commands->Get_Money(poker))
	{
		cost = -cost;
		Commands->Give_Money(poker,(float)cost,0);
		GameObject *LocationObject = Commands->Find_Object(z);
		Vector3 spawn_position = Commands->Get_Position(LocationObject);
		GameObject *createdobject = Commands->Create_Object(preset,spawn_position);
		float facing = Commands->Get_Facing(LocationObject);
		Commands->Set_Facing(createdobject,facing);		
	}
}


http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: Vehicle Poke Help [message #445704 is a reply to message #445681] Tue, 12 April 2011 14:27 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

I will get some pics of how i got mine set up.

With the daves arrow you face it the way you want it and the x,y,z i will make a video of my map that i have it working in.


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: Vehicle Poke Help [message #445705 is a reply to message #445704] Tue, 12 April 2011 14:40 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Distrbd21 wrote on Tue, 12 April 2011 22:27

I will get some pics of how i got mine set up.

With the daves arrow you face it the way you want it and the x,y,z i will make a video of my map that i have it working in.



The X,Y,Z does NOT set the FACING, it only sets the LOCATION. You can rotate something through a full 360 degrees and it's X,Y,Z will remain exactly the same because they have NO RELATION AT ALL to the FACING.

He is not asking how to position the vehicles, he is asking how to ROTATE them. Which that script CANNOT do.


http://steamsignature.com/card/1/76561197975867233.png
Re: Vehicle Poke Help [message #445706 is a reply to message #445681] Tue, 12 April 2011 14:44 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

1. you need to calm your ass down and i will show you that you can with a daves arrow.
2. don't get pissed at me because every time someone needs help with a script y'all just give them some fucked up way of doing it so they give up.
3. I'm uploading a video proving that it does work.

I will finish the video l8r here is a part of it.
http://www.youtube.com/watch?v=ssxYVgarGXw
  • Attachment: 1.JPG
    (Size: 134.12KB, Downloaded 149 times)
  • Attachment: 2.JPG
    (Size: 153.08KB, Downloaded 137 times)
  • Attachment: 3.JPG
    (Size: 132.47KB, Downloaded 146 times)


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide

[Updated on: Tue, 12 April 2011 14:49]

Report message to a moderator

Re: Vehicle Poke Help [message #445710 is a reply to message #445706] Tue, 12 April 2011 16:10 Go to previous messageGo to next message
saberhawk
Messages: 1068
Registered: January 2006
Location: ::1
Karma: 0
General (1 Star)
Distrbd21 wrote on Tue, 12 April 2011 17:44

1. you need to calm your ass down and i will show you that you can with a daves arrow.
2. don't get pissed at me because every time someone needs help with a script y'all just give them some fucked up way of doing it so they give up.
3. I'm uploading a video proving that it does work.

I will finish the video l8r here is a part of it.
http://www.youtube.com/watch?v=ssxYVgarGXw


You need to understand that the orientation (or "facing") of an object has nothing to do with it's position. JFW_Preset_Buy_Poke has no code for changing an object's orientation and as such should not be used for spawning large objects such as vehicles.
Re: Vehicle Poke Help [message #445715 is a reply to message #445681] Tue, 12 April 2011 17:10 Go to previous messageGo to next message
cAmpa is currently offline  cAmpa
Messages: 597
Registered: March 2006
Karma: 0
Colonel
No idea what you all are talking about but http://campa.ren-com.de/scripts.rar should do it. (Haven't tested it so please report if it does run.)

Script CaMpA_Preset_Buy_Poke
Parameters are:
Preset_Name
Cost
location
facing
Player_Type


Bückstabü!
Re: Vehicle Poke Help [message #445724 is a reply to message #445706] Tue, 12 April 2011 22:20 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Distrbd21 wrote on Tue, 12 April 2011 22:44

1. you need to calm your ass down and i will show you that you can with a daves arrow.
2. don't get pissed at me because every time someone needs help with a script y'all just give them some fucked up way of doing it so they give up.
3. I'm uploading a video proving that it does work.

I will finish the video l8r here is a part of it.
http://www.youtube.com/watch?v=ssxYVgarGXw


Yep, that shows him how to set LOCATION. So, when are you going to show him how to set the ROTATION, which is what he wants?

As we keep telling you, LOCATION IS NOT THE SAME AS ROTATION. Stop giving him useless advice which doesn't work.


Anyway, cAmpa has posted a script which will do what you want, but since it appears to be using a custom scripts.dll you won't be able to actually have other players use it unfortunately.


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

[Updated on: Tue, 12 April 2011 22:21]

Report message to a moderator

Re: Vehicle Poke Help [message #445733 is a reply to message #445724] Wed, 13 April 2011 00:53 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)
danpaul88 wrote on Wed, 13 April 2011 01:20


won't be able to actually have other players use it unfortunately.


If it's on the server then he will. Smile



Re: Vehicle Poke Help [message #445774 is a reply to message #445681] Thu, 14 April 2011 00:11 Go to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Good point, I was thinking in terms of LAN games

http://steamsignature.com/card/1/76561197975867233.png
Previous Topic: PIC help
Next Topic: Random Teleport script?
Goto Forum:
  


Current Time: Sat Nov 23 03:06:17 MST 2024

Total time taken to generate the page: 0.00928 seconds