Page 1 of 1
Crashing with no errors
Posted: Sun Jul 04, 2010 10:49 pm
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.
Re: Crashing with no errors
Posted: Sun Jul 04, 2010 11:02 pm
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
Re: Crashing with no errors
Posted: Sun Jul 04, 2010 11:15 pm
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?
Re: Crashing with no errors
Posted: Sun Jul 04, 2010 11:18 pm
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

Re: Crashing with no errors
Posted: Sun Jul 04, 2010 11:20 pm
by swado95
Ok thx at least im getting somewhere now

Re: Crashing with no errors
Posted: Mon Jul 05, 2010 1:34 am
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
)
Re: Crashing with no errors
Posted: Mon Jul 05, 2010 9:09 am
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.
Re: Crashing with no errors
Posted: Mon Jul 05, 2010 9:54 am
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.

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.
Re: Crashing with no errors
Posted: Mon Jul 05, 2010 10:03 am
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?
Re: Crashing with no errors
Posted: Mon Jul 05, 2010 10:17 am
by Aman/Pinguin
Battlefront2_scripting_system.doc wrote:SetBleedRate (team, rate)
This function sets the visible bleed rate for the specified team.
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.
Re: Crashing with no errors
Posted: Mon Jul 05, 2010 10:22 am
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?
Re: Crashing with no errors
Posted: Mon Jul 05, 2010 10:27 am
by Aman/Pinguin
Never tested it, but I think it will work. Just try it out.
Re: Crashing with no errors
Posted: Mon Jul 05, 2010 10:34 am
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.
Re: Crashing with no errors
Posted: Tue Jul 06, 2010 9:13 pm
by lucasfart
So did you change the bleed rate to this:???
SetBleedRate (1, 10)
Re: Crashing with no errors
Posted: Tue Jul 06, 2010 11:10 pm
by swado95
yes