imported>GreyWanderer |
imported>JOG |
Line 149: |
Line 149: |
| end | | end |
|
| |
|
| ==Note on operators==
| |
| Also note that when using valid block types you are also allowed to use operators as part of the Begin command. Whether it makes sense or not depends on the particular situation.
| |
|
| |
| begin OnDrop || OnSell
| |
| ; some script
| |
| ; this will run if the calling object is either being dropped or sold.
| |
| ; for the case the item has been removed by removeallitems with target container ref you
| |
| ; have to store the ref of the target in a ref var and check against it within an OnAdd block
| |
| end
| |
|
| |
| begin OnHit player && OnHitWith SpecialWeapon
| |
| ; some script
| |
| ; this will run if the calling object is hit by the player with SpecialWeapon
| |
| end
| |
|
| |
| begin OnAdd && OnAdd player != 1
| |
| ; some script
| |
| ; this will be run if the calling object is added to the inventory of anyone but the player
| |
| end
| |
|
| |
|
| [[Category: Commands]] | | [[Category: Commands]] |