Dyson Posted November 15, 2015 Report Share Posted November 15, 2015 Hi guys,So I've been working on a ventilation script, but I'm struggling with one aspect. Getting the guys to climb the ladder. I'm guessing I'm gonna have to use an object as a person won't be able to move up a diagonal ladder. But does anyone know of any way to make an object move diagonally across all 3 axis?The rest of the script is done I'm just having troubles with the climbing aspect so I'm appealing to the community for any ideas. I can provide more info if I've been a bit vague but hope some of the scripters out there have some ideas Dyson Quote Link to comment Share on other sites More sharing options...
EmC-Unit Posted November 15, 2015 Report Share Posted November 15, 2015 um, maybe change the placing on axis and move the object at one like on the floor?Or add objcts on the way (like ballz) so the object appears on 1 2 3 4 5 position Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 That's what I've been trying but as far as I can tell there's no way for the game to find the positions on the ladder child's. The game can find child positions on vehicles but the ladder parts are supertruck Childs and not general child's if that makes sense. As for your first suggestion if you mean changing the placement from custom to none and then move from position (base) to (basket) that's another way I've tried but I haven't been able to get it to work. Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 I dont think its possible by script to find the SuperChilds on any vehicle. It can only search for childObjects placed in the "childs" section and not the superchilds section. [Curse you Em4] It would probably be a matter of making every building have a walkable roof and putting the childObject on these walkable sections. The script would simply find the ladder childObject placed at the bottom of the ladder, and then the childObject of the walkable roof part, and have the FF move from the ladder one to the roof one using the MoveToPosition. Another issue that needs to be dealt with is the fact that you also need to script logic that prevents more than one FF going up and down at the same time. A dummy script or condition in the push actions section should do it. How does this vent script affect gameplay? Does it make fires easier to put out, or is it pure cosmetics? Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Pure cosmetics. But everything you've said I've already achieved I'm literally just stuck on the move to position part. The game seems to not want to let the guy move diagonally that's the issue Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 Hmm. Could be the the placement from Custom to None needs to be used in conjunction with moveToPosition(). Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Well the placement isn't an issue as they get on the roof fine just can't get them to climb the ladder only spawn on the roof Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 Are you creating a new FF on the roof or are you using the same one on the ground? Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 The same on from the vehicle. But I'm thinking spawn him direct to the roof, but then hide and create an object on position base, then move to basket diagonally then delete object and show person. The only issue is getting the object to move diagonally. I tried move to position but they seem to just either do nothing or move to random points. Quote Link to comment Share on other sites More sharing options...
FInn Rescue 12 Posted November 15, 2015 Report Share Posted November 15, 2015 What about GTA or some other game ,where they climb a ladder. Do they have a  script you can reference from? Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Yeah but I'm limited by the game engine as to what is physically possible. You can fly in gta but not in em4 fro example. Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 Once again, I will say this: Curse you Em4. So many things you and your younger brother, Em5 could have been. Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Once again, I will say this: Curse you Em4. So many things you and your younger brother, Em5 could have been.Haha amen to that. The interesting thing is that it has been done - So I just literally want to be able to replicate this. When I get home I'm going to try using an object model again and trying to move to position but I've not had luck with that so far Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 Haha amen to that.The interesting thing is that it has been done - So I just literally want to be able to replicate this. When I get home I'm going to try using an object model again and trying to move to position but I've not had luck with that so farAhh good old 2009. I wish those guys were still around. Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Yeah, they managed it but I've been trying to figure out how. At the moment the script all works fine, the ffs just spawn at the moment if I could get them or an object to climb in between which should be fairly straight forward then it will look a little more seamless and smooth Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 If this is for openHouses, I think I know how they might have done it. They probably had the ladder install as usual. There probably was a childObject on the openHouse as well. What they probably did was they created a secondary dummy object on the Openhouse but it only exists when the ladder is in use. They then set this secondary object as the Target for the MoveToPosition function. Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Yeah I can simulate this with a child position or object position ( I create a dummy target on the roof) and they can move between but I've just not been able to get the object to move diagonally I've got the two target points but just the actual movement is the issue. I'll double try again tonight but I wasn't having much luck Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 MoveToPosition takes in a GameObject as its target for motion. My theory is that it would simply require the creation of a secondary object where the firefighter climbs up. I do hope that you've handled the going down part and the script is fool-proof, that way the player can't break the script. Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Yeah getting down already set up and I'm going to try and break it once I've got it all working smooth with the climb and yeah I created a dummy object on the roof so will try again using that as a target and the object as the movable object. Hopefully it'll work this time. I just wanted to check move to position isn't limited to XY movement and can move along the Z axis too Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 It certainly can based on some experimentation that I've tried in the past. Though it involved preplaced objects and not the added complexity of ChildObjects. Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Yeah I've got an object placed on the roof to target for the install script anyway so I'll try and get the climb to work with that too. I'll see how it goes next time I'm on my pc hopefully it'll work and that will be that. Thanks for the help I'll update later tonight Quote Link to comment Share on other sites More sharing options...
itchboy Posted November 15, 2015 Report Share Posted November 15, 2015 I think it would be best to test it first with regular OpenHouses. Once you get the proof of concept down, Id take it to normal roofs. Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Well the script is already set up and working with normal houses and it manages to find all the target points and spawn fine so it shouldn't be an issue. But if I run into problems I'll try moving back to openhouses Quote Link to comment Share on other sites More sharing options...
Pottyscotty Posted November 15, 2015 Report Share Posted November 15, 2015 I dont think its possible by script to find the SuperChilds on any vehicle. It can only search for childObjects placed in the "childs" section and not the superchilds section.Would the 'Superchilds' section be what is brought up from Edit Prototype - Edit Children - Edit Child's? Since with the limited water script you place a small object (Normally something like a golf ball) in there for the position of where the Pump controller would stand. Would there be some point in the script where is has to find that? Quote Link to comment Share on other sites More sharing options...
Dyson Posted November 15, 2015 Author Report Share Posted November 15, 2015 Yeah that's what I'm using but those are seperate to the super truck child's. If that makes sense? Quote Link to comment Share on other sites More sharing options...