ANyone help? ActivateNode Lua Code

Discuss almost anything about RailWorks.

ANyone help? ActivateNode Lua Code

Unread postby ChrisOnline » Sun Jun 18, 2017 3:37 pm

Can anyone help me with this please? I want to de-activate a node from the .GeoPcDx file

The node exists in the <TransforName> list in the .Geo file, so I know that it is a valid node to work with

And I know the code is Call ( "*:ActivateNode", "[nodename]", 0). But I can't for the life of me get it to work.

So please, assuming this is the action required in my .lua file, what function (and maybe parameters) are needed around this line to make it work?

So by that I mean, assuming this is the only action required (and assuming there is no prior lua code to "require")

xxxxxxxx
Call ( "*:ActivateNode", "[nodename]", 0)
end

What does "xxxxxxxx" need to be, in detail?

Thanks for any help, tearing my hair out here :)

Chris
ChrisOnline
 
Posts: 330
Joined: Tue Oct 02, 2012 11:47 am

Re: ANyone help? ActivateNode Lua Code

Unread postby bnsfsubdivision » Sun Jun 18, 2017 3:56 pm

ChrisOnline wrote:Can anyone help me with this please? I want to de-activate a node from the .GeoPcDx file

The node exists in the <TransforName> list in the .Geo file, so I know that it is a valid node to work with

And I know the code is Call ( "*:ActivateNode", "[nodename]", 0). But I can't for the life of me get it to work.

So please, assuming this is the action required in my .lua file, what function (and maybe parameters) are needed around this line to make it work?

So by that I mean, assuming this is the only action required (and assuming there is no prior lua code to "require")

xxxxxxxx
Call ( "*:ActivateNode", "[nodename]", 0)
end

What does "xxxxxxxx" need to be, in detail?

Thanks for any help, tearing my hair out here :)

Chris

Code: Select all
function Initialise ()
 
Call( "*:ActivateNode","Node_Name", 1)

Call ( "BeginUpdate" )
   
end
Kevin Schulz
Artist - Searchlight Simulations
User avatar
bnsfsubdivision
 
Posts: 822
Joined: Sun Feb 20, 2011 5:27 am

Re: ANyone help? ActivateNode Lua Code

Unread postby ChrisOnline » Sun Jun 18, 2017 4:41 pm

Many thanks, but sadly that doesn't work. I know it should, and I already tried many combinations, hence the post.

This is actually a reskin of a UK proprietary item where I am trying to disable decals which are built into the .Geo file. I have disabled the original compiled lua, so I know there is nothing to interfere with mine, but nothing seems to work. Total mystery.

But thanks again for your response

Chris
Last edited by ChrisOnline on Mon Jun 19, 2017 5:40 am, edited 1 time in total.
ChrisOnline
 
Posts: 330
Joined: Tue Oct 02, 2012 11:47 am

Re: ANyone help? ActivateNode Lua Code

Unread postby PapaXpress » Sun Jun 18, 2017 10:38 pm

Is it a child object?
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: ANyone help? ActivateNode Lua Code

Unread postby ChrisOnline » Mon Jun 19, 2017 5:17 am

Only in that it is a Node within the .GeoPcDx file, not in the .bin file. And it is in the <TransformName > list within the .Geo file

Chris
ChrisOnline
 
Posts: 330
Joined: Tue Oct 02, 2012 11:47 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest