Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - ilSilente

#1
Hi to everybody  :)
I was scripting this morning, and (after a forum search) I was wondering why GetProperty/GetPropertyText functions have to be called according to the type of location related.

I mean: every type of object-game share the same property schema, so... since we have GetLocationName and GetLocationType, why can't we have GetLocationProperty instead of:

Code: ags
type = GetLocationType(mouse.x, mouse.y)
if (type == eLocationHotspot) {
  Hotspot* h Hotspot.GetAtScreenXY(x,  y);
  h.GetPropertyText("Desc",  buf);
} else if (type == eLocationObject) {
  Object* o = ...


And (curiosity) why properties are read-only at runtime?
SMF spam blocked by CleanTalk