I've typed in the following command:
SetObjectPosition (1,222,333);
and I got this error message:
"SetObjectGraphic:Invalid object specified"
Here's the strange thing about it, the object DOES exist in the sprite manager and even if I erase the command the error will still appear and list it's location as line 499 when my program isn't that long.
Is this a bug? I did use the 'SetObjectGraphic' command but erased it when the errors started, it seems the command somehow ruined me program. The error continued even after the 'SetObjectGraphic's were deleted.
Any ideas on what could've gone wrong?
Thanks.
Quote from: Novice on Wed 18/08/2004 07:31:16
Here's the strange thing about it, the object DOES exist in the sprite manager...
I think this
was the problem, SetObjectPosition() (and all those "object" related functions) works only with
objects you put
in a room, not a
sprite in the sprite manager. You have to create an object (and choose a sprite graphics to use from the sprite manager) in the room first.
Gilbot, you've done it again buddy ;D!
That WAS the problem, and now, once moe, the game is oooooooon schedual!
Thanks alot and bless you! :D
Oh!!! Gilbot do you know if it's possible to use Objects with regions?
I have different objects moving around the background and I need them to disappear when they reach a certain point then reappear on the screen at a different location.
Should I use Characters instead of Objects or should I use scripting to watch their coordinates? Regions seem like they would be easier but I can't find commands that deal with objects moving onto regions/hotspots.
Hmmm I think that's not possible without scripting, you may do something like:
if (GetRegionAt(GetObjectX(5),GetObjectY(5))==3) { //if object 5 is on region 3
//Blah bla bla
}
Of course, you can always use characters instead.
Smooth coding indeed ;D, I'll try using the characters first but I have to admit scripting is more fun :D!
Hey Gilbot, are there any games that you created here for download? I'd really like to try them ;D, if I can finish this game I hope I can put it here too :).
Heh nope, I'm well know for stalking over here for years but yet didn't make any game. I have an old tech demo demostrating day-night transition effects though (which won't work with current AGS versions anymore).