Forum

> > CS2D > Scripts > Scenario shift position?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Scenario shift position?

6 replies
To the start Previous 1 Next To the start

old Re: Scenario shift position?

Devil-Thanh
GAME BANNED Off Offline

Quote
i'm Vietnamese too. contact me by emailing: - Email address (only visible with login) - or - Email address (only visible with login) -

And i'll help you.

old Re: Scenario shift position?

Dynamite07
User Off Offline

Quote
what? this?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("use","use1")
function use1(id,x,y)
if x == X and y == Y then
menu(id,"Ship,Ride boat|$25")
addhook("menu","menu1")
function menu1(id,title,button)
     if tittle == "Ship" then
     if button == 1 then
         --parse("setpos X Y") ?--
          parse("setmoney "..id.." "..player(id,"health")-25)
          msg2(id,"You successfully rode the boat for $25!")
     end
     end
end
end
end
didnt tested, idk if is what you want.

old Re: Scenario shift position?

Rainoth
Moderator Off Offline

Quote
Write in Pixels where you want your player to appear. If you don't know pixels then go to Map editor and look up the tile you want player to appear, then multiply it by 32 and you'll have your pos or you can just divide by 32 and not bother to count..

old Re: Scenario shift position?

Conscience
User Off Offline

Quote
@user Dynamite07: Your code would not work, keep learning. Also you did not check if the player has enough money or not.

Here:
Code >


@user Rainoth: tile*32+16 will give you the position of the tile in pixels. The +16 is just to make sure you are in the middle of the tile instead of the top left corner.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview