Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   Death to Spies (http://forum.fulqrumpublishing.com/forumdisplay.php?f=91)
-   -   My DtS/MoT mod (http://forum.fulqrumpublishing.com/showthread.php?t=5502)

Liz Shaw 02-05-2010 11:11 AM

Further attempts at doing this have resulted in a syntax error. What have I done wrong here?

Code:

function Level.FindActor
    local radist = Level.FindActor('ZS29);
    if ( radist != nil ) then     
      Actor.EnableMesh( radist, "grm_cap" , false );
    end;
  end

  function Level.FindActor
    local radist = Level.FindActor('ZS30);
    if ( radist != nil ) then     
      Actor.EnableMesh( radist, "grm_cap" , false );
    end;
  end


forlik 02-05-2010 12:50 PM

Quote:

Originally Posted by Liz Shaw (Post 141840)
Further attempts at doing this have resulted in a syntax error. What have I done wrong here?

Code:

function Level.FindActor
    local radist = Level.FindActor('ZS29');
    if ( radist != nil ) then     
      Actor.EnableMesh( radist, "grm_cap" , false );
    end;
  end

  function Level.FindActor2
    local radist = Level.FindActor('ZS30');
    if ( radist != nil ) then     
      Actor.EnableMesh( radist, "grm_cap" , false );
    end;
  end

1. ID should be surrounded with ''
2. Each function should have unique name

Liz Shaw 02-05-2010 01:44 PM

1 Attachment(s)
I can't do this at all! I'm sending you what I'm trying to do. Seems you have more of a knowledge of this than me...

forlik 02-05-2010 02:09 PM

1 Attachment(s)
Quote:

Originally Posted by Liz Shaw (Post 141875)
I can't do this at all! I'm sending you what I'm trying to do. Seems you have more of a knowledge of this than me...

Additional errors:
1. You create function in function. It's not allowed.
2. There are no actor with ID 'ZS29'

Try this lua: Attachment 1908

I can't test it in game just now, but it should work.

Liz Shaw 02-05-2010 02:25 PM

It works! One of them has his képi removed, but it also means that the other one has an unknown ID. He is registered in the SWD as "GermanSoldierZ29", so I thought it was obvious that his ID was "ZS29".

In other news, Strogov now wears the doctor's clothes in Renegades - Haggard Games already gave the doctor his nude texture and pass zone restrictions, but for some reason Strogov can't take his clothes until now. It was easy to do, since the Soviet doctor's clothes are a fourth scientist skin.

Liz Shaw 02-06-2010 05:20 AM

1 Attachment(s)
Is there a similar way to change an actor's skin?

forlik 02-06-2010 07:58 AM

Quote:

Originally Posted by Liz Shaw (Post 141885)
He is registered in the SWD as "GermanSoldierZ29", so I thought it was obvious that his ID was "ZS29".

No, his ID "GZ29".

Quote:

Originally Posted by Liz Shaw (Post 142057)
Is there a similar way to change an actor's skin?

Something like this: Actor.SetSkin(actor, skin)
Try to search "SetSkin" in lua files.

Liz Shaw 02-06-2010 10:24 AM

2 Attachment(s)
Once again, it works! As a cherry on top, whenever Strogov puts on the spare submariner's uniform in King's Riddle, he automatically has the second sailor skin. I did the same thing with the spare doctor's suit in Dora.

Liz Shaw 02-07-2010 01:44 AM

1 Attachment(s)
UPDATE:

All radio operators in Lightning have their models changed to those from Polish Surprise.

forlik, how can you tell an NPC's ID outside the LUA file? This guy's registered in the SWD as "GermanSoldier173".

forlik 02-07-2010 09:32 AM

1 Attachment(s)
Quote:

Originally Posted by Liz Shaw (Post 142178)
forlik, how can you tell an NPC's ID outside the LUA file? This guy's registered in the SWD as "GermanSoldier173".

GermanSoldier173 has empty ID (black area). ID is stored in SWD after 0x3D bytes (yellow area) after the entity name (green area).
You can create ID yourself. Just fill black area with 4-bytes ID in reverse form.
For example, 'S173' should be saved as '371S'. After that you can use this ID in lua: Level.FindActor('S173').
ID should be unique.


All times are GMT. The time now is 10:33 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.