ID:179762
 
I have a car in my game and I have it so you can get in and out, but when I loaded up my game I cannot get into the car, I get up close to it, and still cannot get into the car, same with the gold, I cannot get it.

Here is the code for the car:
obj/Car4
var/old_icon
verb
GetIn() //Players last icon has been overidden
old_icon = usr.icon
usr.icon = icon
GetOut()
usr.icon = old_icon //Player gets his/her old icon back


If anyone can help me could you please assist as I dont know where I am going wrong.

Lee
You need to set src...
obj/rock/verb/throw() //will be accessible
set src in oview(1)
world << "Hurl!"

obj/rock/verb/get() //won't be accessible
//no set src here!
world << "Get!"

In response to Vortezz
Vortezz wrote:
You need to set src...
> obj/rock/verb/throw() //will be accessible
> set src in oview(1)
> world << "Hurl!"
>
> obj/rock/verb/get() //won't be accessible
> //no set src here!
> world << "Get!"
>

Thanks Vortezz, I will try that when out.

Lee
In response to Mellifluous
im confused, lee?
is that the same as good ole kriss lee?

FIREking

ps, i havent been here for a while.
In response to FIREking
FIREking wrote:
im confused, lee?
is that the same as good ole kriss lee?

FIREking

ps, i havent been here for a while.

No, Lee as in "Lebaria" on AIM

Time must be passing by very quickly, as I have started to use my real name on the forums and I have also got another key name (this one) besides the Evil_SSJ4Vegeta key.

Also I know you havent been here for awhile lol.

Lee
In response to Mellifluous
What good is throwing a rock if you can`t pick it up?

What good is running if you cant walk?

What good is a car if you dont set src(or have a driver's Liscense)?


i`ve always been wondering if it is possible to make a racing game in BYOND

-Edward Wong Hau Pepelu Tivrusky 1st
In response to Pillsverry
i`ve always been wondering if it is possible to make a racing game in BYOND

Of course it is. The only thing that you're limited to is 32x32.
In response to Spuzzum
Spuzzum wrote:
Of course it is. The only thing that you're limited to is 32x32.

Well, unless you're willing to create multi-tiled mobs... then just about anything is possible...

~X
In response to Xooxer
This still is not working, I have "set src in view(1)" but when I get close to the car I dont get the options to get in the car, the only option I get is "Get", which in turn picks up the car and puts it in the inventory.

Can someone help please?

Lee
In response to Mellifluous
Mellifluous wrote:
This still is not working, I have "set src in view(1)" but when I get close to the car I dont get the options to get in the car, the only option I get is "Get", which in turn picks up the car and puts it in the inventory.

Wow! Strong character!

Where are you placing "set src in view(1)"? It should be right under the verb declaration.

If you want to get rid of the get() verb so that people can't get cars, you can overide the parent get verb and hide it like this.

obj/car4
get() // overide the normal get() verb
set hidden = 1 // players can't see this verb
// Leave the rest of this verb blank so if they do
// try "get car4", nothing happens.
In response to Shadowdarke
Shadowdarke wrote:
Mellifluous wrote:
This still is not working, I have "set src in view(1)" but when I get close to the car I dont get the options to get in the car, the only option I get is "Get", which in turn picks up the car and puts it in the inventory.

Wow! Strong character!

Where are you placing "set src in view(1)"? It should be right under the verb declaration.

If you want to get rid of the get() verb so that people can't get cars, you can overide the parent get verb and hide it like this.

obj/car4
get() // overide the normal get() verb
set hidden = 1 // players can't see this verb
// Leave the rest of this verb blank so if they do
// try "get car4", nothing happens.



This is what I had in the from when I edited it, before you posted, here is the current code:
obj/Car4
var/old_icon
verb
GetIn() //Players last icon has been overidden
set src in view(1)
old_icon = usr.icon
usr.icon = icon
GetOut()
set src in view(1)
usr.icon = old_icon //Player gets his/her old icon back


Lee
In response to Mellifluous
That should do a trick. Are you sure the car you're approaching is a obj/Car4?
In response to Shadowdarke
Shadowdarke wrote:
That should do a trick. Are you sure the car you're approaching is a obj/Car4?

I have done this twice now lol.

I missed read, thank you again Shadowdarke, I have 2 cars thats why I miss read.

Lee