Home / Forums / Modders Corner / Mafia Editing / Mafia II mods / Some problem in setting Franceska as bodyguard

Some problem in setting Franceska as bodyguard

Home / Forums / Modders Corner / Mafia Editing / Mafia II mods / Some problem in setting Franceska as bodyguard

7 replies
13 years, 6 months ago
#6669

Here is my way:

First run this script:

game.sds:ActivateStreamMapLine("buhviprocSkyChange")

game.gfx:SetWeatherTemplate("DT11part03")

game.game:GetActivePlayer():SetPos(Math:newVector(-1385.9,1483.4,-6.1))

And then:

game.sds:ActivateStreamMapLine("buhviprocSkyChange")

game.gfx:SetWeatherTemplate("DT11part03")

Ses=game.entitywrapper:GetEntityByName("FranceskaSestra")

Ses:SetPos(Math:newVector(-1379.9,1487.4,-6.1))

Ses:Activate()

Ses:InventoryAddWeapon(11,250)

Ses:SetAggressivity(enums.AI_Aggressivity.HearGunshot)

Ses:SetCarAttackPermission(true)

Ses.invulnerability=true

game.navigation:RegisterHumanEntity("FranceskaSestra")

game.navigation:RegisterIconEntity("FranceskaSestra",0,10,"0062020006",true)

Ses:Follow(game.game:GetActivePlayer(), "RUN", 2, 4)

 

Here is the effect:[img]/applications/core/interface/imageproxy/imageproxy.php?img=size=320%2520x%2520240&key=688b85af5a5b67990842f5221b5475c49a509a2168948374615cfde87b721c30[/img]http://farm9.staticflickr.com/8430/7770914186_74b7648184_b.jpg[/img]

 

Franceska will only appear near the Eric’s place if you use my way,why?

I think we can let Franceska appear near player (just like calling Joe and Henry) at anytime.

Does somebody else has any better idea?

13 years, 6 months ago
#14974

BTW,how to set other characters as bodyguard,like Mike,Marty,Eric,Steve,etc

13 years, 6 months ago
#14975

I dont mod mafia 2

but i think that model of char is responsible by this line

 

Ses=game.entitywrapper:GetEntityByName(“FranceskaSestra”)

 

but you will also have to change it here

 

game.navigation:RegisterHumanEntity(“FranceskaSestra”)

game.navigation:RegisterIconEntity(“FranceskaSestra”,0,10,”0062020006″,true)

 

 

And why does it appear there?Because the coordinates of the char are set there

 

Ses:SetPos(Math:newVector(-1379.9,1487.4,-6.1))

13 years, 6 months ago
#14997

Thanks,I tried to edit the Location,but it didn’t work,and even crash my game  <!-- s:huh: --/>:huh:<!-- s:huh: --> ” data-emoticon=””></p>
<p>
 </p>
<p>
And can we let Franceska appear near player (just like calling Joe and Henry)?</p>
					</div>
				</section>

			</article>

					
			<article class=

13 years, 6 months ago
#15040

Here is my way:…

your way it completely copied my script “Freeride Mafia II recollection”

 

http://www.youtube.com/watch?v=SqRjES03b-8

 

using the injector

you can perform anywhere in the city(summer)

DelayBuffer:Insert(function(l_1_0)CommandBuffer:Insert(l_6_0,{

function(l_1_0)game.game:SoundFadeOut(50)return game.hud:FaderFadeOut(50)end,

function(l_2_0)return game.sds:ActivateStreamMapLine(“buhviprocSkyChange”)end,

function(l_3_0)game.gfx:SetWeatherTemplate(“DT11part03”)

Ses=game.entitywrapper:GetEntityByName(“FranceskaSestra”)Ses:Activate()

Ses:SetPos(Math:newVector(0,0,0))Ses:InventoryAddWeapon(11,250)

Ses:SetAggressivity(enums.AI_Aggressivity.HearGunshot)

Ses:SetCarAttackPermission(true)Ses.invulnerability=true

game.navigation:RegisterHumanEntity(“FranceskaSestra”)

game.navigation:RegisterIconEntity(“FranceskaSestra”,0,10,”0062020006″,true)

Ses:Follow(game.game:GetActivePlayer(),”RUN”,2,4)game.traffic:OpenSeason(140)end,

function(l_4_0)game.game:SoundFadeIn(50)return game.hud:FaderFadeIn(50)end})end,{l_1_0},100,1,false)

13 years, 5 months ago
#15115

Thank you very much for helping,I am not familiar with the lua script so I copy from your Freeride-main.sds

13 years, 5 months ago
#15142

Steve,Marty and Joe

 

http://www.youtube.com/watch?v=Cl4gx2QgA5Y

 

using the injector

you can perform anywhere in the city(summer)

DelayBuffer:Insert(function(l_1_0)CommandBuffer:Insert(l_6_0,{

function(l_1_0)game.game:SoundFadeOut(50)return game.hud:FaderFadeOut(50)end,

function(l_2_0)return game.sds:ActivateStreamMapLine(“bar_destruct”)end,

function(l_3_0)game.gfx:SetWeatherTemplate(“DT08part03crazyhorse”)

Joe=game.entitywrapper:GetEntityByName(“Joe”)Joe:SetPos(Math:newVector(0,0,0))

Joe:Activate()Joe:SetAggressivity(enums.AI_Aggressivity.HearGunshot)

Joe:InventoryAddWeapon(11,250)Joe:SetCarAttackPermission(true)Joe.invulnerability=true

Joe:Follow(game.game:GetActivePlayer(),”RUN”,2,4)game.speech:LoadScriptDistrict(“joe”)

game.navigation:RegisterHumanEntity(“Joe”)game.navigation:RegisterIconEntity(“Joe”,0,10,”0062020002″,true)

Steve=game.entitywrapper:GetEntityByName(“Steve”)Steve:SetPos(Math:newVector(0,0,0))

Steve:Activate()Steve:SetAggressivity(enums.AI_Aggressivity.HearGunshot)

Steve:InventoryAddWeapon(13,120)Steve:SetCarAttackPermission(true)Steve.invulnerability=true

Steve:Follow(game.game:GetActivePlayer(),”RUN”,2,4)game.speech:LoadDistrictVarious(“stevefoundry”)

game.navigation:RegisterHumanEntity(“Steve”)game.navigation:RegisterIconEntity(“Steve”,0,10,”0062040008″,true)

Marty=game.entitywrapper:GetEntityByName(“Marty”)Marty:SetPos(Math:newVector(0,0,0))

Marty:Activate()Marty:SetAggressivity(enums.AI_Aggressivity.HearGunshot)

Marty:InventoryAddWeapon(12,120)Marty:SetCarAttackPermission(true)Marty.invulnerability=true

Marty:Follow(game.game:GetActivePlayer(),”RUN”,2,4)game.speech:LoadScriptDistrict(“marty”)

game.navigation:RegisterHumanEntity(“Marty”)game.navigation:RegisterIconEntity(“Marty”,0,10,”0062020008″,true)end,

function(l_4_0)game.traffic:OpenSeason(140)return game.speech:LoadScriptDistrict(“marty”)end,

function(l_5_0)game.game:SoundFadeIn(50)return game.hud:FaderFadeIn(50)end})end,{l_1_0},100,1,false)

13 years, 5 months ago
#15143

Steve’ date=’Marty[/b’] and Joe 

http://www.youtube.com/watch?v=Cl4gx2QgA5Y

 

using the injector

………….

You are so kind,it’s very nice,thank you! <img decoding=” data-emoticon=”” srcset=”/wp-content/uploads/invision_emoticons/smile@2x.png 2x” width=”20″ height=”20″>

  • You must be logged in to reply to this topic.