You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Help and Guidance  \  Scripting

Back to Threads

Viewing Thread: Scripting

 

CJmaster
Joined: 24 December 2008
Posts: 8
25 December 2008 13:40 (UK time)

Hi, I'm new on the forum and I havn't been playing meteor 2 for a long time and I need some help with scripting. I just wonder how to do if I want a vehicle drive for me. Like if I want a helecopter to drop me off some where.

You need to login to create posts in this thread.

DarkRain

Joined: 01 March 2007
Posts: 1193
25 December 2008 14:41 (UK time)

Hello. :) If you mean how to drive a vehicle, that's the way: you go near a vehicle and press the 'e' key. If it's something related to scripting, I can't help you. I am not good at it.
The Dark Age is upon us! Quake 2 mapmaker.


Edited: 25 December 2008 14:41


You need to login to create posts in this thread.

CJmaster
Joined: 24 December 2008
Posts: 8
25 December 2008 15:33 (UK time)

Dark Rain wrote:
Hello. :) If you mean how to drive a vehicle, that's the way: you go near a vehicle and press the 'e' key. If it's something related to scripting, I can't help you. I am not good at it.


No I want the vehicle to drive for me

You need to login to create posts in this thread.

Spy

Joined: 05 October 2007
Posts: 1031
25 December 2008 16:27 (UK time)

@CJmaster

Aah, you mean like when you get in a vehicle, it moves by itself? Im not sure, but i think its something to do with waypoints...
I was known as Naval War before.
I love and mod Amnesia: The Dark Descent.
Also an active osu! player: https://osu.ppy.sh/u/3971179


You need to login to create posts in this thread.

CJmaster
Joined: 24 December 2008
Posts: 8
25 December 2008 17:05 (UK time)

Yes thats what I mean. I've tried everything with the waypoints. Do you know any tutorial?

You need to login to create posts in this thread.

nyasudah
 Official Sponsor

Joined: 06 February 2005
Posts: 832
25 December 2008 17:10 (UK time)

What you need is a vehicle, waypoints and some script (namely OnEnterVehicle and OnWaypointReached (and some others) if I remember well)
there are some good tutorials on meteormods.com
nyasudah / masuda / mp / PetiX / PtX


You need to login to create posts in this thread.

Dthdealer

Joined: 10 March 2007
Posts: 476
26 December 2008 02:07 (UK time)

Replace the text contained in double-colons ( :: ) with desired values.


void OnEnterVehicle_::vehicle's ID::()
{BindObjectToWaypoint( ::vehicle's ID::, ::Waypoint's ID::);}

void OnWayPointReached_::lastwaypoint::()
{
SC_PlayerGetOutOfVehicle;
SC_SetObjectLocked( ::vehicle's ID::, 1);
}

Also known as Veyrdite
My website: http://halestrom.net/darksleep@Occasionally you may meet me when you sleep. In the darkest corners of your dreams, where your phone stops working and you don't know what to do. I'll be there; telling you that I don't support your device.

"Can't you just fix-"
NO! I told you when you bought this, when it goes wrong I can't fix it. It's filled with glue. The Greek goddess of glue Araldities herself would be impressed with this.

Please stop asking me for technical support during your dreams. Can't we just tour some surreal landscapes instead?

"How do I do that?"

Count your fingers. Keep trying. Make sure there's ten.

Then summon me. I am large and covered in wires. Clouds of baking soda pour into your world and a slightly weak yellowy glow appears from the LED strips behind me.

If you can see this message then you're already part of the way there. Keep all your styles disabled and you might see the dream within.

"But there's so much javascript everywhere! I can't see you. Help! I've forgotten to count my fingers! Where do I find them?"

The LED strip behind me pops and goes out. Dark spots appear in the centre of each light. I lift my finger to my lips. The smell of tantalum capacitors fills the air.

Ssh. Don't worry about that. Behind those frameworks there's another person sleeping.

Some day the javascript will sleep too.


Edited: 26 December 2008 02:07


You need to login to create posts in this thread.

CJmaster
Joined: 24 December 2008
Posts: 8
27 December 2008 13:50 (UK time)

Dthdealer wrote:
Replace the text contained in double-colons ( :: ) with desired values.


void OnEnterVehicle_::vehicle's ID::()
{BindObjectToWaypoint( ::vehicle's ID::, ::Waypoint's ID::);}

void OnWayPointReached_::lastwaypoint::()
{
SC_PlayerGetOutOfVehicle;
SC_SetObjectLocked( ::vehicle's ID::, 1);
}


So if I want the vehicle to drive for me I will type OnWayPointReached_::lastwaypoint::(id)

You need to login to create posts in this thread.

Dthdealer

Joined: 10 March 2007
Posts: 476
28 December 2008 02:46 (UK time)

OnEnterVehicle will make the vehicle drive for you and you cannot get out

OnWayPointReached will kick you out of the vehicle and lock it so you can't get in and use it normally.
Also known as Veyrdite
My website: http://halestrom.net/darksleep@Occasionally you may meet me when you sleep. In the darkest corners of your dreams, where your phone stops working and you don't know what to do. I'll be there; telling you that I don't support your device.

"Can't you just fix-"
NO! I told you when you bought this, when it goes wrong I can't fix it. It's filled with glue. The Greek goddess of glue Araldities herself would be impressed with this.

Please stop asking me for technical support during your dreams. Can't we just tour some surreal landscapes instead?

"How do I do that?"

Count your fingers. Keep trying. Make sure there's ten.

Then summon me. I am large and covered in wires. Clouds of baking soda pour into your world and a slightly weak yellowy glow appears from the LED strips behind me.

If you can see this message then you're already part of the way there. Keep all your styles disabled and you might see the dream within.

"But there's so much javascript everywhere! I can't see you. Help! I've forgotten to count my fingers! Where do I find them?"

The LED strip behind me pops and goes out. Dark spots appear in the centre of each light. I lift my finger to my lips. The smell of tantalum capacitors fills the air.

Ssh. Don't worry about that. Behind those frameworks there's another person sleeping.

Some day the javascript will sleep too.


You need to login to create posts in this thread.

CJmaster
Joined: 24 December 2008
Posts: 8
29 December 2008 19:58 (UK time)

Well when I type that into sector mod nothing happends. This is really really fucked up.

You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
29 December 2008 21:02 (UK time)

You have to make an .c or .sc file with a name equal to your map, then put it in the same folder. Then you can put all those things in a function and call that function with a sector trigger.

(If you need an example, you can take a look at the maps and their script files the regular Meteor folder)


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


Edited: 29 December 2008 21:03


You need to login to create posts in this thread.

CJmaster
Joined: 24 December 2008
Posts: 8
29 December 2008 21:23 (UK time)

Mrazerty wrote:
You have to make an .c or .sc file with a name equal to your map, then put it in the same folder. Then you can put all those things in a function and call that function with a sector trigger.

(If you need an example, you can take a look at the maps and their script files the regular Meteor folder)


I checked the "Return To Base" .C file and there it says like this:
void OnMapStart()
{
// get in Chinook
SC_PlayerGetInVehicle( OBJECT_ID_CHINOOK);


_________________________________________

So if I want a police car to drive for me in the beginning I will type:

// get in Police car
SC_PlayerGetInVehicle( OBJECT_ID_POLICECAR); / or something?


You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
29 December 2008 22:03 (UK time)

Yes, but don't forget to put in the OnMapStart event, which is the event that is called when the map initiates.


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use