Crashing with no errors

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Crashing with no errors

Post by swado95 »

Ok i created a basic script and when i go to munge in munges fine no errors then when i got to play game it crashes on last bubble with no errors in the log.

heres script.
Hidden/Spoiler:
testsfunction = OnCharacterDeath (
function (cis_inf_rifleman, rep_hero_anakin)
if GetEntiryName(cis_inf_rifleman) == "cis_inf_rifleman"
then SetBleedRate (5, 1)

end
end
)
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Crashing with no errors

Post by Deviss »

mm no should to be:

Code: Select all

    onfirstspawn = OnCharacterdeath(
        function(player, vehicle)
            if IsCharacterHuman(player) and GetEntityClass(player) == GetEntityClassPtr("cis_inf_rifleman") then
                SetBleedRate (5, 1)
            end
        end
    )
or simil xD
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Crashing with no errors

Post by swado95 »

why do u have vehicle it should be character shouldn't it?

and its still saying if anakin kills the droid then the tickets will bleed like that right?
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Crashing with no errors

Post by Deviss »

swado95 wrote:why do u have vehicle it should be character shouldn't it?
ops yeah sorry i modified mine to like your, player or character i believe is the same :)
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Crashing with no errors

Post by swado95 »

Ok thx at least im getting somewhere now :D
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Crashing with no errors

Post by Aman/Pinguin »

Code: Select all

	BleedRateFunc = OnCharacterDeath(
		function (character, killer)
			if GetEntityClassName(GetCharacterUnit(character)) == "cis_inf_rifleman" and GetEntityClassName(GetCharacterUnit(killer)) == "rep_hero_anakin" then
				SetBleedRate (5, 1)
			end
		end
	)
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Crashing with no errors

Post by swado95 »

Im going to keep reading about luas later on but why do i need the entity names?

Ok im not sure but do i have it set to a ticket every 5 sec or a 5 tickets every 1 sec?

It dosnt seem to be working because when i kill droid rifle man with anakin the bleedrate doesn't go up.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Crashing with no errors

Post by Aman/Pinguin »

Battlefront2_scripting_system.doc wrote:SetBleedRate (team, rate)
This function sets the visible bleed rate for the specified team.

You should look into the Battlefront2_scripting_system.doc in BF2_ModTools\documentation. :wink:
Right now it's set to a BleedRate of 1 for team 5. I didn't use that function yet, so i just copied it assuming you did it right.
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Crashing with no errors

Post by swado95 »

ok thx but dont u mean for team 1 bleed rate 5? And i need to have ATT, and DEF instead of numbers for the teams right?
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Crashing with no errors

Post by Aman/Pinguin »

Battlefront2_scripting_system.doc wrote:SetBleedRate (team, rate)
This function sets the visible bleed rate for the specified team.
swado95 wrote:

Code: Select all

then SetBleedRate (5, 1)
Get it?

Also, these lines

Code: Select all

	--  REP Attacking (attacker is always #1)
    REP = 1;
    CIS = 2;
    --  These variables do not change
    ATT = REP;
    DEF = CIS;
are making sure it doesn't matter if you use REP, ATT or 1 (CIS, DEF or 2) for the teamnumbers.
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Crashing with no errors

Post by swado95 »

Ok i get it now so Rep team number is 1 and cis team number 2.

Quick question could i put a -10 and gain tickets or do i have to get another code?
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Crashing with no errors

Post by Aman/Pinguin »

Never tested it, but I think it will work. Just try it out.
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Crashing with no errors

Post by swado95 »

Ok i did the map but when i killed the rifle man with anakin my team didn't start bleeding out. And i set the bleed to 10 so it should be noticeable.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Crashing with no errors

Post by lucasfart »

So did you change the bleed rate to this:???
SetBleedRate (1, 10)
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Crashing with no errors

Post by swado95 »

yes
Post Reply