Page 1 of 1

'origin' Argument

Posted: Mon Oct 03, 2011 5:00 pm
by Sared Kilvan
Affects: Commands

Summary: Spawn npc's, effects, teleport, and set spawnpoints based on relative player position.

Suggestion: Add an 'origin' argument to npc, rpeffect, rptele, and rpspawnpoint so that, instead having to pre-determine spawn coordinates, commands are executed on XYZYAW location based off of the players current position. By inputting 20 -30 0, the command would go off at the players position, plus twenty units on the X axis, minus thirty units on the Y axis, and on the exact same Z axis. By leaving the YAW field blank it could, by default, take the players yaw and add/subtract 180 to rotate and face the player.

Implementation: /npc spawn [origin] [vehicle] <type> [targetname] [team] [model] [X Y Z YAW]

'origin' argument takes players current position and adds the values given.

References: RPMod documentation.

Posted: Mon Oct 03, 2011 10:22 pm
by Ellana
Think this would definitely be useful :)

Posted: Tue Oct 04, 2011 4:05 am
by Sai Akiada
In the wee small hours last night, this seemed like a grand idea but as I read it now, I'm slightly confused.

When spawning things at the player location you do not need to enter in co-ordinates anyway. /npc spawn vehicle jsf - spawns it on your present location.

Have I missed the point in my weary morning state? heh

Edit // Unless you are talking about making binds so you do not need to return to the location.
/bind <key> npc spawn vehicle jsf sai origin

Then walk away and hit the bind, spawning the ship in your previous co-ordinates..?

Posted: Tue Oct 04, 2011 5:05 am
by Sebastin Creed
You can bind rporigins to NPC spawning commands. I used to do it for 8 vehicles at one time when I hosted Flight Class.

Also, you simply need to rporigin someone, then spawn the NPC at the same origin but with a few numbers adjusted if you are looking to give them something (Though I remember Jamus killed me when I asked him to spawn me a box when he was on the second floor and I on the first).