If I have an object ID, how can I know to which object (here I talk about name of that object, not which in the room it is..) it belongs to?
Id ---> Objects
Started by SpiderKing, Apr 27 2007 09:44 AM
7 replies to this topic
#1
Posted 27 April 2007 - 09:44 AM
#2
Posted 27 April 2007 - 09:45 AM
object_get_name(objectid)
OR
object_get_name(instanceid)
both *should* work.
OR
object_get_name(instanceid)
both *should* work.
#3
Posted 27 April 2007 - 09:59 AM
Well lets say i have a script, whit argument0 being a ID. And lets say this ID "belongs" to an object named ob_enemy. I want to make
with( )
{
//action
}
this action execute for all ob_enemy not just for the one whit given Id...
with( object_get_name(argument0))
{
//action
}
this one doesnt work :S
with( )
{
//action
}
this action execute for all ob_enemy not just for the one whit given Id...
with( object_get_name(argument0))
{
//action
}
this one doesnt work :S
#4
Posted 27 April 2007 - 10:19 AM
Ah, so you want object id from instance id?
with object_get_id(argument0)
{
// action.
}
with object_get_id(argument0)
{
// action.
}
#5
Posted 27 April 2007 - 11:12 AM
"unknown function: object_get_id"
doesnt work
doesnt work
#6
Posted 27 April 2007 - 12:43 PM
Oh yeah.
Sorry - that was just balls
What you really want is this:
Sorry - that was just balls
What you really want is this:
with (argument0.object_index)
{
do_something_fun()
}
#7
Posted 27 April 2007 - 12:46 PM
Think that works.. Thank you
#8
Posted 27 April 2007 - 12:51 PM
No trouble.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











