RDCNemesis Posted May 24, 2011 Share Posted May 24, 2011 Hi all Im trying to place c4 on a vehicle. I place it in map editor, name _id is c4aa1. In editor the c4 is showing. when loading GRAw i either get into the map and no ce is showing or i crash with "identifers must match" the script posted crashes !-- ------------------------------------------ TRIGGERS ----------------------------------------------------- --> <user name="unit_in_area1" type="once"> <trigger type="UnitInArea" area="area1"/> <event name="start_area1"/> </user> <user name="unit_in_area2" type="once"> <trigger type="UnitInArea" area="area2"/> <event name="start_area2"/> </user> <user name="unit_in_area3" type="once"> <trigger type="UnitInArea" area="area3"/> <event name="start_area3"/> </user> <event name="aa1_trigger"> </user> <!-- ------------------------------------------ EVENTS ----------------------------------------------------- --> <event name="start_game"> <element type="UnitInArea" area="area1" state="activate" start_time="1"/> <element type="UnitInArea" area="area2" state="activate" start_time="1"/> <element type="UnitInArea" area="area3" state="activate" start_time="1"/> </event> </enable unit="enable_c4"> <element type="EnableUnit" c4aa1="c4_aa1" start_time="1.0"/> </event> <!-- ------------------------------------------ area1 events ----------------------------------------------------- --> <event name="start_area1"> <element type="UnitInArea" area="area1" state="deactivate"/> <element type="ActivateGroup" group_id="group1" start_time="0"/> <element type="ActivateGroup" group_id="gun1" start_time="0"/> <element type="ActivateGroup" group_id="gun2" start_time="0"/> </event> The vehicle with c4_aa1 placed on it is in area1 What am i doing wrong Many thanks in advance Nem Quote Link to comment Share on other sites More sharing options...
Tinker Posted May 24, 2011 Share Posted May 24, 2011 You have probably read this, not sure: GRAW SP Scripting 5 - Demolition Objective or i crash with "identifers must match" the script posted crashes Is there a text file that saves crash reports? Are you 100% sure it is not a simple typo in naming conventions? Quote Link to comment Share on other sites More sharing options...
AmEyeBlind Posted May 25, 2011 Share Posted May 25, 2011 <user name="unit_in_area3" type="once"> <trigger type="UnitInArea" area="area3"/> <event name="start_area3"/> </user> <event name="aa1_trigger"> </user> this is wrong, and not needed in this place, just delet it. <event name="start_game"> <element type="UnitInArea" area="area1" state="activate" start_time="1"/> <element type="UnitInArea" area="area2" state="activate" start_time="1"/> <element type="UnitInArea" area="area3" state="activate" start_time="1"/> </event> </enable unit="enable_c4"> <element type="EnableUnit" c4aa1="c4_aa1" start_time="1.0"/> </event> and this is wrong. the correct code would be this: this line can be used in any event you want. <element type="EnableUnit" name_id="c4_aa1" start_time="1"/> and you will need this event, even when you dont trigger anything from it. its coded , you need it. <event name="aa1_trigger"> <element type="DisableUnit" name_id="c4_aa1" start_time="15"/> </event> also i got a scripting hint for you. set the times in the start game event never below 3, i had already once a problem that an area didnt activate because of that. Quote Link to comment Share on other sites More sharing options...
RDCNemesis Posted May 25, 2011 Author Share Posted May 25, 2011 Tinker Yes i have, tried it that way and still didnt work, 4 hours trying it :wall: I will look for a crash log if i can find it AmEyeBlind Thanks will try and not put anything below 3 and will try the disableunit scripting too Glad you 2 read and comment Tinker Crash log found.... Tue May 24 22:02:01 2011 Crash in application version: grpcrc1.35 data\levels\custom_levels\test map\test map.xml (48): Identifiers must match SCRIPT STACK data\levels\custom_levels\test map\test map.dsf(26)One other thing If i place c4 in area 1 I guess the scripting needs to all be in area 1 also!!!!!! Quote Link to comment Share on other sites More sharing options...
RDCNemesis Posted May 25, 2011 Author Share Posted May 25, 2011 AmEyeBlind Im confused over the name_id. the link Tinker posted says name_id => use the same name you gave the c4 prop in the map editor Does this mean when i place c4 the name box by default says none if i name it lorryc4 for example should i put lorryc4 instead of name_id Quote Link to comment Share on other sites More sharing options...
Tinker Posted May 25, 2011 Share Posted May 25, 2011 No name_id=none You replace the none with your name name_id=my_c4_01 Quote Link to comment Share on other sites More sharing options...
RDCNemesis Posted May 25, 2011 Author Share Posted May 25, 2011 the light has clicked on i think Many thanks, just had 8 errors again trying this LOL DOH there should be a homer simpson emoticon on here for times like this Quote Link to comment Share on other sites More sharing options...
RDCNemesis Posted May 25, 2011 Author Share Posted May 25, 2011 Nope <event name="start_area1"> <element type="UnitInArea" area="area1" state="deactivate"/> <element type="ActivateGroup" group_id="group1" start_time="0"/> <element type="ActivateGroup" group_id="gun1" start_time="0"/> <element type="ActivateGroup" group_id="gun2" start_time="0"/> </event> <enable unit="enable_c4"> <element type="EnableUnit" name_id="c4_apc" start_time="3"/> <event name="aa1_trigger"> <element type="DisableUnit" name_id="c4_apc" start_time="15"/> </event> Tried this several ways still getting Crash in application version: grpcrc1.35 data\levels\custom_levels\test map\test map.xml (48): Identifiers must match SCRIPT STACK data\levels\custom_levels\test map\test map.dsf(26) i have taken out the <enable unit="enable_c4"> and the map loads but no c4 on vehicle so i guess that line of code is either not needed or its in the wrong place Quote Link to comment Share on other sites More sharing options...
Tinker Posted May 25, 2011 Share Posted May 25, 2011 <event name="start_area1"> <element type="UnitInArea" area="area1" state="deactivate"/> <element type="ActivateGroup" group_id="group1" start_time="0"/> <element type="ActivateGroup" group_id="gun1" start_time="0"/> <element type="ActivateGroup" group_id="gun2" start_time="0"/> </event> <enable unit="enable_c4"> <element type="EnableUnit" name_id="c4_apc" start_time="3"/> <event name="aa1_trigger"> <element type="DisableUnit" name_id="c4_apc" start_time="15"/> </event> Are those 2 lines not meant to be in an event? Do you even need the first? Sry I am not up to speed with aw1 scripting, but is this not what you need? : <event name="start_area1"> <element type="UnitInArea" area="area1" state="deactivate"/> <element type="ActivateGroup" group_id="group1" start_time="0"/> <element type="ActivateGroup" group_id="gun1" start_time="0"/> <element type="ActivateGroup" group_id="gun2" start_time="0"/> <element type="EnableUnit" name_id="c4_apc" start_time="3"/> </event> <event name="aa1_trigger"> <element type="DisableUnit" name_id="c4_apc" start_time="15"/> </event> Quote Link to comment Share on other sites More sharing options...
AmEyeBlind Posted May 25, 2011 Share Posted May 25, 2011 that script that tinker posted should work, but i am not 100% sure if you can name the c4 probs like you want. there is some hardcoded stuff on the c4. whenever i used c4 on a map i named the c4 like the prob i used. so c4_aa1, c4_aa2, c4_aa3 or c4_gasstation, those are the only c4 probs that you can use. Quote Link to comment Share on other sites More sharing options...
RDCNemesis Posted May 25, 2011 Author Share Posted May 25, 2011 Tinker & AmEyeBlind thanks will give it a try, there are three of us trying to get this working and we have all failed so far. fingers crossed my next post will say its working Quote Link to comment Share on other sites More sharing options...
RDCNemesis Posted May 25, 2011 Author Share Posted May 25, 2011 Genius many many thanks it works. i thought i had tried all the different ways to script it obviously not lol Many thanks to both of you again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.