Looking for help on a specific spatial script

Ardent

A Smooth-Skin
Modder
Hello, everyone!

I'm trying to make a script which checks if dude_obj is at a certain area at a certain hour.

The thing is:

Dude should be in his prison cell at 23h00. If he isn't, the guards call the alarm. The cell is like 30 hexes, so I don't really feel like writing:

Code:
if (not ((tile_num(dude_obj) == 20000) or (tile_num(dude_obj) == 20001)) etc...)

I thought about making a spatial, but is there a possibility to make:

Code:
procedure (not(spatial_p_proc)) begin...

??? Don't think so. BTW, making spatials around the cell is useless - there are too many places dude can be in to do so.

Any ideas how to solve this problem are welcome.

Sorry if this question seems n00b or anything. I'm just a beginner scripter.

Thanks in advance for your time.
 
one way is write a spacial that sets a variable when dude enters the cell,then another that sets it back when dude leaves,then do your check against the variable
 
Back
Top