ToFireStation script question for additional vehicle in Fire Station 1
#1
Posted 22 September 2010 - 10:38 PM
Ok, small update. Tried to call HES out of Fire Station 1 and it wouldn't move so I sent some officers over there to blow it up and sent tow truck out to haul it away and what do ya know, a new one was already there and it is functional. So I am having some scripting problems all the way around I guess. Will it be hard to fix this mess?
I tried uploading the script for ya all to check out but it says I don't have permission to upload the file? Never had that problem.
#2
Posted 23 September 2010 - 01:54 AM
then post the link in here.
I would be happy to look into this, with just a little time and patience. Could you also post some screens of what happens and what you want it to look like?
You can also PM me if you like.
#3
Posted 23 September 2010 - 06:07 AM
put them in a zip and upload them to http://rapidshare.com/index.html
then post the link in here.
I would be happy to look into this, with just a little time and patience. Could you also post some screens of what happens and what you want it to look like?
You can also PM me if you like.
Here is the link to the files:
http://rapidshare.co...963/Scripts.rar
Picture:
http://tinypic.com/r/2hwgvo5/7
#4
Posted 23 September 2010 - 12:39 PM
GameObjectList l7;
Game::CollectObstaclesOnVirtualObject(VO_USAR, l7, ACTOR_VEHICLE);
if(l7.GetNumObjects() > 0)
{
Vehicle m = l7.GetObject(0);
PersonList passengers = m.GetPassengers();
if (passengers.GetNumPersons() == 0)
{
m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 1, false);
m.PushActionWait(ACTION_APPEND, 0.5f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 1, false); again, but the VO should be VO_USAR2 (unless you have changed the named of the vurtual object in editor)Also in LAFireStationStart script, you added the second HES, but the vurtual object is the same as the other one, i think you need to change it to VO_USAR2
In the LAReturnToFIreStation script,
ParkinglotFound = true;
ActorList l1 = Game::GetActors(VO_USAR);
ActorList l2 = Game::GetActors(VO_USAR02); Should be:ParkinglotFound = true;
ActorList l1 = Game::GetActors(VO_USAR);
ActorList l2 = Game::GetActors(VO_TURNTO2);And below that,
ActorList l1 = Game::GetActors(VO_USAR);
ActorList l2 = Game::GetActors(VO_TURNTO2);
ParkinglotFound = true; should beActorList l1 = Game::GetActors(VO_USAR2);
ActorList l2 = Game::GetActors(VO_TURNTO2);
ParkinglotFound = true;
That was just a quick glance, if you confused have a look at the code for the engines, its very similar to what you want to achieve. i think your just getting your virtual objects confused!
#5
Posted 23 September 2010 - 06:09 PM
Update: So I added this to the end after Engine 4 (virtual object behind Engine 2) and here is the code:
GameObjectList l12;
Game::CollectObstaclesOnVirtualObject(VO_USAR02, l12, ACTOR_VEHICLE);
if(l12.GetNumObjects() > 0)
{
Vehicle m = l12.GetObject(0);
PersonList passengers = m.GetPassengers();
if (passengers.GetNumPersons() == 0)
{
m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 1, false);
m.PushActionWait(ACTION_APPEND, 0.5f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 1, false);
}
}
}
}
if(Caller->HasName(NAME_CONTROLPANEL2)) //= fire station 2Did I do this wrong? It gives me a error on line 433 which line 433 is the Control Panel 2 code. I got a syntax error and that's the line it told me to fix. So I did something wrong here and hopefully someone can tell me.
LAFireStationStart script:
I'll take a look at it and make the changes to it and see if that works. That may be what my spawning problem is.
LAToFireSation script:
I made the changes. Hope that fixed it.
Everything you mentioned is what I thought but I don't know how to do the virtual object stuff yet. Eventually I want to learn how to make addition virtual objects on map for units to spawn and return to but that will be extensive work. Also, I been following the Engine 2 script because Engine 1 has all the if FS1 is closer go there or if FS2 is closer go there stuff and it makes me all confused.
#6
Posted 24 September 2010 - 01:07 AM
} } } }Needs to be spaced out more, staggered! look at the end of the station 2 code, and basically copy, and that should get rid of ur santax error!
#7
Posted 24 September 2010 - 05:48 AM
#8
Posted 24 September 2010 - 11:54 AM
const char VO_USAR2[] = "fs_usar02";
#9
Posted 24 September 2010 - 04:00 PM
you put this line in at the top of the 4 scripts??
const char VO_USAR2[] = "fs_usar02";
Think so, I will double check.
the LAFireStationStart script was - const char VO_USAR02[] -"fs_usar02"; so I changed it from hyphen to equal sign and we'll see what it does.
Update:
So that minor mistake I had made the HES finally spawn in the second Virtual Object, I can successfully take the HES squads out of the fire station but then the problem returning to the fire station becomes a problem. I have a problem in the Fire Station and To Fire Station scripts I am guessing. So I will go through them and see if I made a mistake somewhere. This is becoming a pain, hopefully it gets solved and works.
Update #2:
Found another minor mistake in the FireStation script. The HES spawns in both virtual objects but they do not return to station right. One of them backs into the parking spot while the other one goes through the back. So I just need to fix the To Fire Station script and I think it should work.
#10
Posted 07 November 2010 - 10:03 PM
NOTE: Here is the file link. The LET is simply taking USAR's place so just look for USAR and USAR2 because those are the LETs
ToFireStation script: http://www.megaupload.com/?d=J8Z5F5ZW
Let me know if you would like to take a look at the LAFireStation script or the LAFireStationStart script, although both are working just fine.
#11
Posted 08 November 2010 - 01:02 AM
#12
Posted 08 November 2010 - 02:19 AM
I couldn't use OBJ_USAR for multiple Virtual Objects? If I understand what you mean i should have it something like where VO_USAR uses OBJ_USAR and VO_USAR2 should use something like OBJ_USAR2???
and of course VO_USAR = "fs_usar" and VO_USAR2 = "fs_usar02"
#13
Posted 08 November 2010 - 03:21 AM
so I can't just use the same prototype?? like if OBJ_USAR = "mod:Prototypes/Vehicles/02 LA Fire Department/light_equipment_truck.e4p"
I couldn't use OBJ_USAR for multiple Virtual Objects? If I understand what you mean i should have it something like where VO_USAR uses OBJ_USAR and VO_USAR2 should use something like OBJ_USAR2???
and of course VO_USAR = "fs_usar" and VO_USAR2 = "fs_usar02"
Thank you for not making a new topic. Yes, you can do that, I did the same thing but with the HES. It was a pain and I am still not finished with my script but I got them to return to station without any errors or problems.
You shouldn't have to make a second OBJ_USAR but you do need to make a second virtual object line. Just below the fs_usar line, you need to add this:
const char VO_USAR02[] = "fs_usar02";
#14
Posted 08 November 2010 - 04:04 AM
const char VO_USAR2[] = "fs_usar02"but it still tells me that there is no space.. I am going to try creating the second OBJ and seeing what happens but also If you could share your script with me that would be awesome and post what you changed and how u did it so that I may pass on the information to my modding partner.
**UPDATE**
Well I tried the second OBJ approach and had a LITTLE more success but not quite.. Before, the first LET would return to the station but stop in the SECOND LET's place and the personnel would get out... this time the first LET returned to where it should normally be, but the second LET got the "this vehicle doesn't belong in the fire station" message. I am going to wait until I can view your script and hear from you what you did step by step before I continue. If you're willing to share that information with me of course.
#15
Posted 08 November 2010 - 04:34 AM
One mistake here: const char VO_USAR2[] = "fs_usar02" - You need to change VO_USAR2 to VO_USAR02
Find the first USAR code (Just below the Battalion) and replace it with this:
Then scroll down to the next USAR code and replace it with this:
If you find a error or make it work like the engines, let me know and we will get it fixed.
#16
Posted 08 November 2010 - 05:39 PM
#17
Posted 08 November 2010 - 06:35 PM
Even closer success this time thank you very much. One of the reasons that mine wasn't working is because I wasn't touching the SECOND usar code lol under Dummy CheckParked or whatever lol. But there is a slight problem. Rather than one going in the front and one through the back, they both try to go to the back, one gets in, stops in the second USAR's place, and the personnel get out, but the second one tries to go through the back as well, and the back door opens but the first USAR just sit's there, and the second USAR can't get in and they just sit there. Any suggestions?
Alright, I fixed it and it now returns to station just like the engines. I made a couple mistakes and I finally found them. Copy my code and paste it over the SECOND USAR code. The first USAR code is fine.
#18
Posted 15 November 2010 - 12:55 AM
#19
Posted 15 November 2010 - 05:51 PM
I am having a very similar problem. I made a new freeplay map and I use the LAFirestation and all the vo's are the same as the original LAMod for now. I just thought I would use this to see if it would work on my map. My problem is that the personnel is spawning and the vehicles are all spawning in the right spots but all facing the wrong direction and when I take them out of the firestation and have them return to the firestation they stop at the back door and the back door will not open and they do not enter. The fire chief and other vehicles that park in the back of the station return to their spots but they will not park on the vo Bat Chiefs spot they stop and park in the Bat Chief 2 spot which is in front. What am I doing wrong?
Upload your LAToFireStation script into a zip file and upload it on here so we can take a look at it and maybe get it functional.
Well, your second problem is a easy fix but your first problem I'm not positive on. I have my ideas but I'll wait for the script. In my opinion, when you send the units back to station and the garage doors don't open is because the station is all backwards (the gates and virtual objects).
Did you turn the station around in your map or is it in the same position?
#20
Posted 16 November 2010 - 12:27 AM













