Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
blaze908
18
Years of Service
User Offline
Joined: 4th Jul 2006
Location:
Posted: 2nd Aug 2006 23:58 Edited at: 3rd Aug 2006 00:12
This is a really cool idea but idk if it could be done.

Is there a way to make a zone so when you pass over it, all the lights cut off, and then about two or 3 seconds the lights cut back on and an enemy appears in front of you?

EDIT: Thank you to whoever moved it

Will that be chicken or fish?
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 3rd Aug 2006 00:53 Edited at: 3rd Aug 2006 01:01
All of that could be done in the characters script and bypass the zone.

Use a transparent alt texture for the character (alttexture=1).
Edit his AIMAIN to have his normal AI wait until the player is a certain distance from him (plrdistwithin).
Once the player is there, then cut out the lights (activateifused=1) and set a timer (timerstart).
After the timer is done (timergreater) it cuts on the lights (activateifused=0).
This of course means you are using the light in the characters IFUSED by editing their FPE.
Then, it progresses to a state that uses his normal AI and his visible texture (alttexture=0).

If you have played around with scripting, then you should be able to understand this.
If not, maybe someone with some spare time can edit your character's script for you.

Edit
Actually it would be better to change his texture before you turn on the light, then go to normal AI.


Don't forget to visit Conjured Entertainment
blaze908
18
Years of Service
User Offline
Joined: 4th Jul 2006
Location:
Posted: 3rd Aug 2006 05:03
ty but im like half lost

Will that be chicken or fish?
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 3rd Aug 2006 08:16
Conjured, spawn the character using the spawnon and spawnoff commands (at least I believe they work). Of course setalphafade=0 'should' work.

And of course why complicate things with fpe editing when you could just name the character light1.

And as said a few times, timer can cause problems, I replace it with random= (30fps) * time * 2 but timer might work well enough.

Not trying to diss your work, just offering advice to simplify things.

So I think (character (init))

:activated=1,random=120:spawnon
:state=0:spawnoff,state=1

and just name it light1

Your Mod was deleted by the Government.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 4th Aug 2006 03:18
@Merranvo
How is naming the character light1 going to turn the light on or off?

I'm not questioning your coding abilities, I'm just wondering how.

I don't like to use alphafade, but that's just me.
I didn't have time to write it and test it for him, so I threw out an idea.

I don't think about condensing the code as much as you, but it's all good.
Just goes to show there is more than one way to skin a cat.
If anyone else has a different method, please speak up because the more the merrier.

@blaze
Quote: "ty but im like half lost"

What AI Main were you using for your character Blaze?
I'll see what I can do.


Don't forget to visit Conjured Entertainment
HandK
18
Years of Service
User Offline
Joined: 24th Jun 2006
Location:
Posted: 4th Aug 2006 03:31 Edited at: 4th Aug 2006 03:33
Light1 is a sript to turn something on (Ie make it appear), specificaly it turns on Light1

So naming the character light1, will make the character "appear" when Light1 is run

(Dont tell anyone that I told you this, cos if its wrong Merranvo will shout at me)

H&K
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 4th Aug 2006 03:56 Edited at: 4th Aug 2006 21:06
Quote: "Light1 is a sript to turn something on (Ie make it appear), specificaly it turns on Light1"


Dude,
I know that light1 is a script, but that doesn't explain how naming the character will run that script.

Quote: "So naming the character light1, will make the character "appear" when Light1 is run"

How does naming the character light1 make it do anything?
That has nothing to do with the script that is assigned to the character.
The light1 script works when use as an AIMAIN for a light, because it uses the lighton and lightoff actions.


As you can see from light1.fpi's code those are the only two actions it uses.
The light1 script is used by the light itself.
The light would then be named in the IFUSED of an entity (or character in the FPE)
Ususally the entity is a switch.
The switches script then calls the activateifused=1 or activateifused=0 action to make the light1 script take its action.

I mean no offense HandK, but your answer did not explain how changing the charatcers name would control a light.
Changing the name of a character does not change the script its using, and only the script can make anything happen.


EDIT
Nevermind,
after giving it more thought, the answer is obvious.
The lighton and lightoff actions evidently call the default name of light1 internally in the program.
So, the lighton/lightoff actions themselves activate anything named light1.
Ok Merranvo, I guess you can teach an old dog new tricks...er hacks.

Use his method Blaze, its better than mine.
Its actually a very clever way of killing both birds with one stone.

Second Edit
NOPE... The default name for a light is Light, so I retract my agreement.
I tried the naming the character light1 thing, and got nowhere.
I am going back to my first idea, but I might use ambience to simplify it.

Blaze,
Tell me which character and script you are using, and I will try to get it working.


Don't forget to visit Conjured Entertainment
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 7th Aug 2006 09:36 Edited at: 7th Aug 2006 09:39
Quote: "NOPE... The default name for a light is Light, so I retract my agreement"

Proceeds to bang head against keyboard.

Yes, the idea was to activate the light to turn it on, and activate the enemy at the same time (with the same zone).

I think, at least, that you should be able to spawn by having that script as the init script.


You were right the first time, I just got the wrong name.


(more redundant explanation)
See, a button can turn on lights, no? It should do this by activating 1 (it may be 0... I forget) the ifused field SHOULD call all entitys of the same name. SO if the light is called light1 and the enemy light1 then they both are activated.

Your Mod was deleted by the Government.

Login to post a reply

Server time is: 2024-11-22 19:46:53
Your offset time is: 2024-11-22 19:46:53