Jump to content
Sign in to follow this  
gachopin

gac_train with script sample 0.8

Recommended Posts

I made a train script too, but i dont finish it becouse i cant make it to work normali in MP. It is work in in MP? Good job!

Edited by danczer

Share this post


Link to post
Share on other sites
I made a train script too, but i dont finish it becouse i cant make it to work normali in MP. It is work in in MP? Good job!

just have the script run on the server only then control it by vehicle vars thsi way the train will be local to the server and should not cause any visual lag.

Share this post


Link to post
Share on other sites

Is it possible to make it work so that they are driving back and forth in every mission?

Share this post


Link to post
Share on other sites

back is not support :|

If you put gac_trainA B C ,train can move everywhere even though on bridge.

Share this post


Link to post
Share on other sites

This is great stuff man! Only missing thing is that these trains are invulnerable and unstoppable. Otherwise, awesome addon and scripting! Thanks!

Share this post


Link to post
Share on other sites

adding Hitpoints & a damage system is pretty easy, if you want I can take a look at it :D

Share this post


Link to post
Share on other sites

Somebody had too, all we need from BIS now is access to raw models to animate level (railroad) crossings etc. & who will be first with a station building rather than helo pad.

Gachopin, nice start

Share this post


Link to post
Share on other sites

I love it so far. Great sounds to. I like that you can hang on the side when driving. I love that!

I just love everything about it, the only thing I'd fix is the corner work and position work..it's a bit blocky.

Nonetheless, great job. I remember being so happy with AEF for Ofp.

Share this post


Link to post
Share on other sites

Next some clever WWII fanatic needs to make this, and give it to OPFOR (reworking the 'scrapmetal' history of the Gustav Gun a bit to say that the US gave it to the USSR following WWII out of respect for the assaults on Fort Stalin, Fort Lenin and Fort Maxim Gorki...maybe a good mission background?)

gun.jpg

Share this post


Link to post
Share on other sites

Looking forward to the mission that tries to use that weapon and the 1,000 men it took to service it. Easy pickings for any airpower in the area.

Share this post


Link to post
Share on other sites

Moving train by player is very difficult, so I need more time to test :)

By the way, when moving train on bridge, sometimes train don't move correctly,

So I rewrited a scriptfile.

If you want to move trains on bridge correctly, please replace this file :

http://gachopin72.s296.xrea.com/etc/GAC_movetrain.sqf

(changed sentence)

_railpos = [getpos _rail select 0,getpos _rail select 1,_pos select 2];

_rail= nearestObject [[getpos _train select 0,getpos _train select 1,0], _railtype];

Share this post


Link to post
Share on other sites
Looking forward to the mission that tries to use that weapon and the 1,000 men it took to service it. Easy pickings for any airpower in the area.

The weapon could be a good basis for a mission, esp. if the mission involves the weapon in use throughout firing either on an in-map area or part of a campaign on another area (weapon in Chernarus, early mission on UTES, but end of mission finds unknown bombardment of island, moving to second mission to disrupt bombardment)

Of course, I'm one of those nubs with lots of ideas and zero editing ability, so instead I'll be pleased to see the train as a usable transport addon in the future.

Share this post


Link to post
Share on other sites
adding Hitpoints & a damage system is pretty easy, if you want I can take a look at it :D

Did you have a go at this, Drew? I have a big mission just waiting for it.:)

Share this post


Link to post
Share on other sites

Hello very nice addon , but I cant make the train to move:butbut:.

How can I do it?

I have put this as mod folder @gactrain

and put in all files including mission.sqf etc.

Sorry but Im not good at this :)

Share this post


Link to post
Share on other sites

Hi there...You have to use the example mission. Put it in your ArmA2 Other profiles/your playername/missions and load it in editor. Copy all objects etc. to your own mission and save it. Than you have to copy the skriptfolder and the init.sqf to your saved missionfolder in ArmA2 Other profiles/your playername/missions/yourmission.

In the Editor it has to look like this on Screenshot.

I wanted to use this great skript, but i have a strange bug. Anybody know how to fix it? I made a little clip. At 1:10 the train makes some crazy moves and i dont know how to fix it :confused:

Edit... : lol i forgot to post the video.. 273d2f-4.jpg

Regards Culti

Edited by Cultivator

Share this post


Link to post
Share on other sites

THanks Cultivator but I give up on this.

When Im trying to do like you said i got this before the mission starts.

Script\train\function.sqf not found

I tried everything but still I cant make the train to work.

Well at least i tried :)

Share this post


Link to post
Share on other sites

So ... Did you copied the skriptsfolder and the init.sqf from gac_train-testmission to your own missionfolder?

trainskripts.jpg

Share this post


Link to post
Share on other sites

I did everything you said but still I get the same message

Script\train\function.sqf not found

No worries I would make it work soon :).

Share this post


Link to post
Share on other sites

Apologies for the thread resurrection but I do have additional info to contribute :)

Gachopin,

I wanted to give you a status update on some testing I did this weekend.

First, I believe I know what the problem is for the strange movements in Chernarus. It appears it is trying to correct for < 0 or > 360 degree direction changes. It seems that when the train has to move its heading from < 0 to 359 degrees, the code "resets" the direction which causes the train to make that odd looking rotation movement on the tracks. I see from your scripts that there is a code attempt to correct this, but I it seems the fix doesn't work. It doesn't affect game play at all, but it does look odd. The good thing is that it only happens 2x on the tracks in the NE corner of Chernarus.

Second, I had a thought about a trigger-based way to simulate a destroyed track to stop the trains. Since the markers must be within 20m of each other, I think you can set a trigger that (a) removes the nearest markers from the bomb, and (b) sets the train speed to 0. I think this can be done with a script that runs either "on fired" or on an action/radio comms, etc. that does a "nearestobject" check and then deleteVehicle the markers. Then all that should be needed is to set the train speed to 0

Finally, train map templates for Chernarus and Fallujah!

-----------------------------------------------------

I have made a set of sample missions that make the train work in Chernarus E-W and W-E for the entire track! I came up with an alternative method to fix the bridge issue, using a setPos/modeltoworld command that makes the markers on the bridges float at a discrete height above the ground. It works perfectly:

this setPos (this modelToWorld [0,0,3.75]);

The sample missions for Fallujah are the same - one W-E and one E-W.

Sample missions here:

https://skydrive.live.com/?cid=5b54fc51a7917265#cid=5B54FC51A7917265&id=5B54FC51A7917265%211934

The game time for either map is about 45 minutes total, assuming the train makes a few 60 second stops along the way.

Share this post


Link to post
Share on other sites

Hi! Does anybody know, how to use function "movebyplayer"? If I understand right, it allows for player to drive a train?

In "init.sqf" there is that:

/* !!!!!!!!!!!!!!!!!! still WIP !!!!!!!!!!!!!!!!!!!!!!!!!!!

//----------------------- player -----------------------------------

sleep 5;

call compile preprocessFileLineNumbers "script\player\movebyplayer_function.sqf";

train_move_by_player = _trains select 0;

train_move_by_player execVM "script\player\movebyplayer.sqf";

What is it? Where I should write this, to init of the player? I tried to do that, but it doesn't work.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×