![]() |
Realy simple setshape question
Uhm I dont know if Im too tired to think right now but isnt setshape supposed to
block movement on its area? if (playersays(moo)){ setshape 1,32,32; showimg 1,door.png,playerx,playery; } When I use that the door png wont block the player and it can walk right trough |
A few things:
#1. Don't use playersays, instead use: NPC Code:if (playerchats && strequals(#c,moo)) #2. If you want it to block, use: NPC Code: Normaly, if you don't use setshape, it will be the shape of the image. If you're making it to a shape of tiles, you can use setshape 1,2*16,2*16; Where the 2's are the width and height in tiles. It is easier that way, if you're making it large that is. #3. If you don't want it to block, use: NPC Code: Did that help at all? |
Nope.
Its part of a bigger script. I need to use showimg not setimg because I need it at specified x & y. if (playersays(plah)) { setimg whatever.png; setshape 1,32,32; } That wont do because it will simply display at where ever the image is on the level. So I need to use showimg but I need to make it block also. |
Oh nevermind, solved.
Stupid me... Just: setimg pfft.gif; x=playerx; y=whatever; >_< |
I wonder tho...
if (playersays(moo)){ setshape 1,32,32; showimg 1,door.png,playerx,playery; } if (playertouchsme) { destroy;} Before I used this script. Mostly I couldnt touch the door image, but sometimes it was destroyed when the player walked trough it. So is it possiple to "touch" pictures displayed by showimg? |
-Playersays is deprecated. That means don't use it.
-A showimg image is just a displayed image. A showimg image is _not_ an NPC that you can interact with. |
Guess I have to go back to my putnpc2 studies.
There has to be some bug in showimg tho, because sometimes it did react to touching, or maybe Im just insane. |
Just use
NPC Code:x = position; where position is a number. Edit: or something which reflects a number. |
Yeaahh but dosent realy cut it for what I need it for.
I'll do it with putnpc2 when I learn to use it one of these days. |
Quote:
|
No, it disapeared when I touched the image or so I believe.
I also believe that there are demons inside my computer and that they mess with my mind. Anyhow does this look ok: NPC Code: Thats how I would try it but I cant test it right now online, and it probaply doesnt work anyway, sooo.... What did I do wrong? |
|
| All times are GMT +2. The time now is 02:07 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.