Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Tue Nov 24, 2026 3:26 pm
All times are UTC + 0
Train modding question
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [18 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Sun Mar 10, 2013 4:04 pm    Post subject:  Train modding question Reply with quote  Mark this post and the followings unread

I've been lately doing random stuff with Tiberian Sun, and lately stumbled on a very annoying problem: I've set up a train track with gates between it on the tracks. The gates work as expected, lowering when the train approaches The problem though is that it the Istrain=yes rule makes the train C4 the gates. It does not happen all the time, there are fixed situations where the gates do not get blow up, but those are only a few. I tried to make the gates immune, adding lines like bridgerepairhut=yes and immune=yes, but nothing helps.

Is there a way to make buildings immune to the istrain=yes C4 effect? Or perhaps removing the C4 effect from the istrain=yes?

Back to top
View user's profile Send private message
Zero18
Commander


Joined: 10 Dec 2012
Location: I'm too busy conquering the world!

PostPosted: Sun Mar 10, 2013 4:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Create a Celltag undeneath the Gate so that when the train across the gate it blows up the gate. Or set timer before the gate so that when the gate goes down, it will blow up. These can be done by triggers.

_________________
Mod Leader and founder of World Domination


Back to top
View user's profile Send private message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Sun Mar 10, 2013 4:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Zero18 wrote:
Create a Celltag undeneath the Gate so that when the train across the gate it blows up the gate. Or set timer before the gate so that when the gate goes down, it will blow up. These can be done by triggers.


Ehmm, I want the contrary: NOT to blow up the gate? The train automatically destroys the gate when it travels over it.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sun Mar 10, 2013 4:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

He wants to stop the train from blowing up the gate not make it blow it up :/

Have you tried making the train stop in front of the game for a few seconds, I might be that the train goes threw the gate before it fully opens & thus destroys it.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Sun Mar 10, 2013 4:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
He wants to stop the train from blowing up the gate not make it blow it up :/

Have you tried making the train stop in front of the game for a few seconds, I might be that the train goes threw the gate before it fully opens & thus destroys it.


Yes I did, didn't help. Though it gives me an idea: is it possible to speed up the framerate of the opening/closing animation of the gates?

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Mar 10, 2013 5:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

IsTrain is like a SuperOmniCrusher in Ra2. It crushes everything and AFAIK you can't prevent that, unfortunately.
Though if you still found a solution, please let us know Smile

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Sun Mar 10, 2013 7:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

I made some more discoveries.

First of all, I scripted the train to around. The IsTrain=yes line infact necessary for the to script to work. If it is not added, the train will at best move to the first waypoint, if that waypoint is at one straight line.

Secondly, discovered by accident, if the gate lowered before the train arrives, it will not blow up. Are there triggers of some sort to directly lower a gate? If not, I need to script a unit to go through the gate each time.

Lastly, from certain directions the gates will not blow up even if the gates aren't lowered beforehand, AT A CERTAIN MAXIMUM SPEED. If the train goes too fast it will blow up. I set its speed at 5; trains moving through gates from either BL to TR, or TL to BR will not blow the gate up.

Mind you that even though speed can still be decreased, going lower would mean it misses the point of having a transport train on the map.

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Sun Mar 10, 2013 10:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

truefeel wrote:
Secondly, discovered by accident, if the gate lowered before the train arrives, it will not blow up. Are there triggers of some sort to directly lower a gate? If not, I need to script a unit to go through the gate each time.


Nope, you could however spawn a dummy unit as soon as the train gets near it (cell-tags), that dummy unit would then move across the gate and back as soon as the train has moved over it.

Train near gate -> Dummy spawns at the side of the gate where the train is.
Dummy wants to go behind the gate -> gate lowers, when unit is at waypoint behind the gate, set local.
Local set -> Train 'clear' to move, clear local when it passes the gate.
Local clear -> Dummy unit back to its original spawn point (depending on the direction of the train eg. circular)

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Sun Mar 10, 2013 11:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

I have given up on the idea. The game really does not coöperate on this one. Apart from blowing up gates, the train with following cargo units ends up like a harmonica each time it is waiting at a gate, with the individual units of the train ending up being so close that they "C4" eachother.

Back to top
View user's profile Send private message
Volgin
Commander


Joined: 07 Mar 2009

PostPosted: Mon Mar 11, 2013 1:49 am    Post subject: Reply with quote  Mark this post and the followings unread

Lol. can you please post a gif of that? I want to see a train explodimonica.

_________________
Victory!

Back to top
View user's profile Send private message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Mon Mar 11, 2013 2:01 am    Post subject: Reply with quote  Mark this post and the followings unread

Nope, sorry. I already made the changes. I'm quite happy with the result now. Although no gates, the track is awesome now. It was particulary difficult to get the track implemented. I am actually using GDI mission 09 Core of the Problem for it.

Back to top
View user's profile Send private message
Morpher
General


Joined: 28 Jan 2005

PostPosted: Mon Mar 11, 2013 2:31 am    Post subject: Reply with quote  Mark this post and the followings unread

What happens if you make a tunnel tube that skips the gate cell?

_________________


Back to top
View user's profile Send private message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Mon Mar 11, 2013 10:28 am    Post subject: Reply with quote  Mark this post and the followings unread

Like a tunnel beneath the gate? Like I said, I am working on an already existing map. I implemented 2 pairs of tunnels entrances, which were extremely hard to place due space restrictions. More tunnels as practically impossible. If it were possible though, it would of course solve the problem.

Back to top
View user's profile Send private message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Mon Mar 11, 2013 4:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

I have GREAT news!

I was just scimming through the map tutorial section when I hitted this:
http://www.ppmsite.com/forum/viewtopic.php?t=28514

Basicilly it gives a very nice alternative for gates: Setting up laser fences and make a laser post go offline when units want to pass through. I tried it ingame by placing a laser fence, between laserposts, on the track and setting the laserpost offline. Works like a charm. It only needs some triggers and a bit of adapting the train script to get it done automatically, but that should be only minor work.

I know it is just a game, but now I feel like this:




Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Mar 11, 2013 6:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Gates look nicer. Give my method a shot and you'll agree.

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Mon Mar 11, 2013 6:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

RP wrote:
Gates look nicer. Give my method a shot and you'll agree.

Gates are indeed nicer, but in some cases the gates still blow, even though being fully lowered.

I also have a problem; an attached trigger will not fire. I set it up like this:

Trigger 1: "Laser gate1 on" repeating
-Event0: 13. Elapsed Time --> 10
-Action0: 62 turn on building
-Action1: 54 Disable trigger "laser gate1 on"

Trigger 2: "Laser gate1 off" repeating; Trigger 1 is attached to this trigger
-Event1: 1 Entered by... 3 Special (House of train); celltags in front of laser gate
-Action0: 61 turn off building
-Action1: 53 Enable trigger "Laser gate1 on"

I attached trigger 2 to the laser fence post. Trigger 2 fires, turning the fence post off, but trigger 1 does not fire, so the fence post does not reactivate after 10 frames. What did I do wrong?

EDIT: NVM, it appears to work suddenly... .

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Mar 11, 2013 7:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

You did remove the tag of the trigger not attached to the fences, right? If you want to attach trigger 1 to trigger 2, you have to remove the tag of trigger 1 (as it uses the one from the 2nd trigger).

Also, for a repeating trigger to be called again, you'd have to disable it when it has fired all actions. Trigger 2 needs to disable itself after it is finished.

Trigger 2; default not-disabled? Event met, entered by House 3 -> Turn building off, enable Laser gate1 on + Disable Trigger 2.
Trigger 1; Enabled by Trigger 2, event met; 10 seconds passed -> Turn building on, enable Laser gate1 off + Disable Trigger 1.

That is how you make them loopable. It also prevents the game from re-enabling Trigger 1 when a train car (wagon) has moved over the celltag. As soon as a train hits the celltag, it disables itself to prevent restarting of the elapsed time and enables the 'closing' of the gate. When the gate is closed, it will re-enable the opening trigger making this whole story repeat itself.

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
truefeel
Rocket Cyborg


Joined: 02 May 2006

PostPosted: Mon Mar 11, 2013 8:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

RP wrote:
You did remove the tag of the trigger not attached to the fences, right? If you want to attach trigger 1 to trigger 2, you have to remove the tag of trigger 1 (as it uses the one from the 2nd trigger).

Also, for a repeating trigger to be called again, you'd have to disable it when it has fired all actions. Trigger 2 needs to disable itself after it is finished.

Trigger 2; default not-disabled? Event met, entered by House 3 -> Turn building off, enable Laser gate1 on + Disable Trigger 2.
Trigger 1; Enabled by Trigger 2, event met; 10 seconds passed -> Turn building on, enable Laser gate1 off + Disable Trigger 1.

That is how you make them loopable. It also prevents the game from re-enabling Trigger 1 when a train car (wagon) has moved over the celltag. As soon as a train hits the celltag, it disables itself to prevent restarting of the elapsed time and enables the 'closing' of the gate. When the gate is closed, it will re-enable the opening trigger making this whole story repeat itself.


Yeah made a mess on that one. Luckily I got it working now, and the clone trigger feature made life a whole lot easier.

Mind you that I still had to be careful; the train coming at full speed to the unpowered laser fence will still blow it up. The train first has to stop right at the fence before proceeding. This way the train will not blow the fence. I also tried this with normal gates, but unfortunaly that did not worked.

So yeah, I got some sort of a gate system now. I found it unlogical to have heavily guarded bases which have gates for standard unit, but have a big hole in the wall for a train to come through.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [18 Posts] Mark the topic unread ::  View previous topic :: View next topic
:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2553s ][ Queries: 9 (0.0108s) ][ Debug on ]