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 Product Chat / linktoplr Questions

Author
Message
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 13th Jul 2015 13:54
Hello all in the effort to solve a different problem I have an idea
of having 3D buttons for certain actions that are linked to the plr
on screen and hidden till required.

Ive had some success simply using



But Ive encountered the issue where the entity does in fact rotate with the player and is locked in position relative to the player and moves with them. But it doesnt seem to be taking the player rotation into account.

For example you start with it in front of you, if you strafe left and right it remains locked in place relative to the player in the bottom centre of the screen, forwards backwards, fine.

But if I rotate left or right, the entity does indeed rotate but it rotates on the spot instead of around the player.

Is there someway of locking the camoffset value that im using to position the item a certain distance from the player, so that the entity remains at that distance from the player and rotates around them as the player rotates?

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 13th Jul 2015 21:36
Sinister Spoon
Not quite sure what you mean, the script you have will allow
entity to rotate on Y axis a set distance from player. But
you also said..
Quote: "and rotates around them as the player rotates?"
kind of lost what you mean with that
Like spins/moves around the player?

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 16th Jul 2015 18:26
Like it occupies a place relative to the screen, so it links to the player and faces them in the centre of the screen, and no matter where the player looks moves or faces it stays fixed relative to the camera, similar to how the gun models remain glued to the camera and in the same relative fixed position regardless of where the player aims.

I had some success after posting this but it always seems to be linked to the players feet with the offset y commands not working, I gave up in the end and it lead to an even better idea.

See my post about the hud related memory issues and theres an updated demo of my WIP demo in there which shows how i ended up overcoming the issue. More thinking out of the box im afraid

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Jul 2015 01:48
Sinister Spoon
Quote: "but it always seems to be linked to the players feet"

I didn't seem to have that problem. I adjusted the script a bit
and the entity stayed at a distance from player. But either way,
happy you came up with a better idea
best

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 23rd Jul 2015 00:52
well Im both curious how you managed to achieve it, I played around with the cam offsets and could only get it to read one offset at a time, not sure how compatible it would be with black ice but I would like to use this technique to centre an item in the players screen and gently rotate it for a second before it disappears when they pick up said item so if you would like to clue me in Id be appreciative

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 24th Jul 2015 18:02
Sinister Spoon Your right, I thought I had it the first time,
but trying to reproduce it seems difficult. I can either get
a crate to turn on it's "Y" axis but stays in place, or get
it to "swing-around" with players view but wont turn on its "Y"
axis? https://www.youtube.com/watch?v=VCgm-vdI1fc&feature=youtu.be

An alternative would be to figure out how to use the "grab an entity" action ( the "T" key or the RMB to grab an object)
There's also an internal variable for "mouse movement"
$MMY (y direction) & $MMX (x direction) I wonder if those could be used somehow to move/rotate an entity?

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 30th Jul 2015 16:02
Thanks Mako. I thought It was the case it seems to two commands dont seem to like working together, I tried staggering them and having a time swap between their respective states but no nice.

I was thinking of maybe using a force right click command but getting the item to zoom to the player and rotate seems awkward with that option.

Im wondering if rotateiy might be applicable but with it linking to the players feet that seems to be the biggest hurdle. Im wondering if it might be to do with floorlogic, physics on/off, immobility etc, as Ive noticed some of the models change position from the editor when actually playing the game, some of the models Ive had to script to rise a certain amount before showing itself.

Not to worry. Im sure between us we can figure it out

smoke em if you got em
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 30th Jul 2015 16:26
Ok heres what I got so far, it does exactly what I need it to do EXCEPT remain locked to the camera like a gun hud, which i suppose is the easiest way to do something like that in retrospect. Which if you wouldnt mind giving me a hand with

( I have no idea how to make vweaps gunspecs etc, but it doesnt need to be animated just hide or show the model when I need it)

but yeah link to plr, so what this does is when you click an item, centers it in screen, disables the player, rotates the item around its y axis then when player clicks, destroys the item and returns player control.

Since I cant get it to remain fixed wherever the player looks, locking the player cam seemed like the obvious comprimise



I tossed that into a stock ww2 brown radio, set it to dynamic, immobile no, physics yes, active yes.

and it pretty much worked.

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 31st Jul 2015 21:51 Edited at: 31st Jul 2015 21:59
Sinister Spoon
Yeah, I'm trying a few things here with not to much of a better
result. I see what you mean, I tried out your script. I can easily make a hud.x (weapon to pickup) if you need? Like what kind of
model, just a crate/box? (or something else) Also what distance
out from the player does it need to be? (arms length or more?)

Also, I tried "plraction" commands like "plraction=10" (force left mouse button) to grab and hold an entity, but it didn't workout.

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 31st Jul 2015 22:46
Yeah I havent had much luck with the plraction commands either, I was using them slightly differently though having connected a 360 controller and trying to somehow emulate a mouseclick (Personally I think its appalling they added controller support without a way for us to edit the button mapping or emulate mouse clicks) since the Y button on the controller is mapped to Enter key or at least performs the same engine function I was attempting to use the condition plrusingaction=1 to prompt a mouse click using plraction=9 but no luck there tho I think thats more to do with how its hard coded into the engine rather than mapped to keys (I confirmed this by setting up an fpi script to display the scan code number for any key pressed and none of the controller buttons displayed a scan code key so it must be directly coded into the source


But on the subject of hud weaps, if you try my WIP on the WIP board, when you enter battle mode you will see exactly what I mean, in relation to what the models would look like and their distancing from the player. You,s4, xplosys, nomad, black fox, really wanna hear your guys's opinion.

If youd be willing to make them Id send you the models and everything you need to make them, or you could make a generic template for them and i could bang out the rest myself so as not to waste too much of your time

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 1st Aug 2015 07:44
Sinister Spoon
Downloading demo now, must say after looking at the screen shots I can't wait to try it out. Looks good and I saw you used "BlackIce" for this.

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
15
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 2nd Aug 2015 00:37
Yeah I couldnt resist, it was the first mod I actually managed to get to work to any degree successfully and the results speak for themselves, the performance increase is dramatic on my low end pc and nomad mods lighting looks so lush and that cel shader, well you KNOW how long ive wanted a full screen post effect cel shader and to find that black Ice had one I almost leapt out my seat

Thanks for trying it out, let me know what you think over on the WIP thread.

FYI I discovered how to make a mouse driven inventory so expect the current inventory system to be ripped out in favour of the new one very soon!

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 3rd Aug 2015 18:54
Sinister Spoon
I think I have exhausted every option to get a player to "grab/take hold" of an entity without some kind of problem associated.
Really the best, only way I found so far is just to use the RMB or "T" key. I did notice in Black Ice mod's doc's folder there is a "new script command" file. It has some new "bind entity to cam" actions, I tried some but not really sure how to use them, so didn't work out to well. Take a look at them and see what you think?
Quote: "I discovered how to make a mouse driven inventory"

Very interested on seeing what you come up with
best

My games never have bugs. They just develop random features..
Lots and lots of random features...

Login to post a reply

Server time is: 2024-04-20 02:20:13
Your offset time is: 2024-04-20 02:20:13