small question about EditAttachedObject
#1

Hello,

Its not realy clear to me if EditAttachedObject is better use for scripters only.

Or is it okay if players use EditAttachedObject and fit something like a hat on their skin themselves ?
or would that bug real hard ?
Reply
#2

No, the function is made for the player in the game, its interface is made in game so player can use mouse and click on the buttons to edit the attached object.

Also it won't bug as it will just change the position, rotation and size. Even it has no limit, player's mouse wont be able to reach the highest value of position, rotation, or size since the editor is attached on the attached object which attached on the player...

i kinda doubt with your question, cmiiw.
Reply
#3

I see i was a bit confused becaues i see alot of filterscripts made just for glasses..or just for hats
and i wondered why they didnt just made one FS for all at the same time and let the player figure the position out themselves with that interface.

Thanks
Reply
#4

You should impose limits, otherwise people could scale their objects to be massive, regardless of what Robo said.
Reply
#5

Quote:
Originally Posted by MP2
Посмотреть сообщение
You should impose limits, otherwise people could scale their objects to be massive, regardless of what Robo said.
you mean like narrowing down the choice and ammount of objects players may use ?
Reply
#6

Quote:
Originally Posted by AIped
Посмотреть сообщение
I see i was a bit confused becaues i see alot of filterscripts made just for glasses..or just for hats
and i wondered why they didnt just made one FS for all at the same time and let the player figure the position out themselves with that interface.

Thanks
The answer is what MP2 said, it's because the Hat or Glasses are meant to be IT (Hat or Glasses), Using this Edit function might allow the player to get the stuff of the hat/glasses limitless Such as Hat placed -1m from Head might be placed below your legs, so it's not called a Hat anymore, also Glasses that would be resized to large size, larger than the player's character body, so it's not called Glasses anymore, but Giant Glasses Custom.
Quote:
Originally Posted by MP2
Посмотреть сообщение
You should impose limits, otherwise people could scale their objects to be massive, regardless of what Robo said.
Quote:
Originally Posted by AIped
Посмотреть сообщение
you mean like narrowing down the choice and ammount of objects players may use ?
Yes, so what he mean, you can still use this, but make sure limit the positions, rotation, or sizes.
For example: Glasses or other object shouldn't be two times larger, and shouldn't use negative value as it will looks like upside down object:
pawn Код:
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
    if(response)
    {
        if(0.0 > ScaleX >= 2.0 || 0.0 >  ScaleY >= 2.0 || 0.0 > ScaleZ >= 2.0)
        {
            SendClientMessage(playerid, 0xFF0000FF, "* The attached object size can't be too small or to large!"); // Give warn
            SetPlayerAttachedObject(playerid, index, //.... Your code, use the variables to restore the last saved attached object, so the current edit will be rolled back
            EditAttachedObject(playerid, index); // Edit again

        }
        // Your code
    }
    // Your code
    return 1;
}
Reply
#7

Someone should add the thing you explained to the wiki with an exclamation mark or something.
Both of you thanks for clearing this up
Reply
#8

Quote:
Originally Posted by AIped
Посмотреть сообщение
Someone should add the thing you explained to the wiki with an exclamation mark or something.
Both of you thanks for clearing this up
I will do this when (if...) the wiki gets sorted out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)