Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Frustrated with Scripting

Author
Message
4Blades
16
Years of Service
User Offline
Joined: 23rd Jul 2008
Location:
Posted: 30th Jul 2008 22:18
Every method I try to use for my intended result meets with a roadblock, and it's getting frustrating.

First I tried to move a dynamic crate entity using the movetotarget command. Wouldn't move at all, so I removed the box and tried the command on a character entity. The character entity would move toward the target, but would sometimes stop part way there for no apparent reason....this is on a simple map with just floor segments.

Then I used a combination of rotatetotarget and movefore to get the character to move to the target. That worked, but it is pointless if anything happens to be in the way.

So, thinking I could float the character above any obstacles then drop them later, I tried floating the entity, and also tried turning gravity off, and in each case, the character ceases to move at all when commanded to.

The last thing I tried was building a floor with holes a few levels higher, thinking I could walk the character forward and just have it fall through a hole. Nope. The character stops at the edge of the hole.

EVERY thing I try meets with an unexpected result. There is a sad lack of command descriptions to know how and when scripting commands will work and when they won't.

If there were such a thing as Free Will, I'd be exercising right now.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 31st Jul 2008 00:22
It really depends on the ground dsegmenta that you used. Some segments cause problems. Could you post your scripts please? The crate mightnot be moving because the physics system could be getting in the way. I really don't know how to help until you provide more information.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 31st Jul 2008 00:43
The crate not moving is the reason vehicles in my Mod are required to be Character entities. It's not just you, simple dynamic entities cannot move on their own accord.

The engine ATTEMPTS to move them, but friction with the floor and other physics issues come into play and prevent it from moving (well).


As for the character not falling through the hole you made, perhaps try this.

On the segment space where your "hole" is, place a wall there but no floor so that that cell will be flagged as HAVING a segment. If memory serves I believe entities are forbidden from moving in "Null Spaces" which have no segments. They can be thrown into them by the player, but they cannot be scripted to enter them.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 31st Jul 2008 00:57
Correct.

4Blades
16
Years of Service
User Offline
Joined: 23rd Jul 2008
Location:
Posted: 31st Jul 2008 17:28
Thanks for the tip, Ply.

I guess I'm just annoyed that each command has a bunch of quirks that are not documented, so each scripting goal requires learning by trial and error what is possible and what isn't.

I've started a document for the detailed nuances of each command I work with so as to possibly help others in the future.

If there were such a thing as Free Will, I'd be exercising right now.

Login to post a reply

Server time is: 2024-11-24 12:12:02
Your offset time is: 2024-11-24 12:12:02