The Dink Network

Reply to Re: stalkers and invisible walls

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
September 29th 2012, 12:11 PM
wizardg.gif
Paul
Peasant He/Him United States
 
Dink (i.e. sprite 1) is the only one that actually persists across screens, so the only way to create the effect of a following sprite is to keep a sprite 1000 script running that recreates the "following" sprite whenever Dink enters a new screen. The standard way to do that is to check for &player_map changing, but recently I was experimenting with another method where you actually create two sprites, the second being an invisible one with a sentinel value in sp_brain, meaning something weird like 23, 666, 1337, or whatever number appeals to you. Then you repeatedly use get_sprite_with_this_brain to check if the sprite still exists, and if not, assume you have to recreate the follower as well.

For the second one, can't you just use an invisible (sp_nodraw) sprite with a touch function?