HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

CTF flag, without an item?

05-08-2006, 04:15 PM#1
HalfSlothNCamel
Is there a way to make a Hero pick up a flag when they click on it, and attach the flag to their model without using an item to do this? Is it easy enough to do this and still make the checks for capturing the flag?

How do I go about doing this?

I assume I could set up a trigger to mark a player when he clicks on the flag using a variable. Then for capturing and returning the flag I make a check for the variable and resetting the variable respectively?

Can someone give me a simple example of this?
05-08-2006, 04:19 PM#2
Thunder_Eye
You can either attach it with Special Effects, or attach them with an ability
05-08-2006, 04:39 PM#3
HalfSlothNCamel
Then after I do that, what kind of trigger should I set up for capturing the flag?

Right now I have a script looking for a hero carrying that item, but I want the heroes to be able to have 6 items and run the flag. So do I mark the flag carrier in the trigger somehow and check for that mark in the capture region?
05-08-2006, 04:41 PM#4
Thunder_Eye
Yes that would work, there are numerous ways to "mark" a unit
05-08-2006, 04:56 PM#5
The)TideHunter(
Yea, have the flag as a tome with the flag model, so when the unit picks it up the item dosent check if inventory is full, once it has picked it up have a trigger with the event 'A unit picks uses a item' and do the conditions how you want, checking the item picked up was the flag tome item of course.

Either store the unit in a variable or set custom value to 1, create a special effect to the unit and store that effect in a varible.

Have another trigger then firing when a unit dies, check if the unit was your varible unit or custom value of dieing unit was 1, if so, remove the special effect variable and do your actions.

If you want me to post triggers i will, its quite simple

EDIT: nevermind, il post triggers anyways
here they are:

Add the flag:

Trigger:
A Unit Captures the Flag
Collapse Events
Unit - A unit Uses an item
Collapse Conditions
(Item-type of (Item being manipulated)) Equal to 'Your Flag Tome Item'
Collapse Actions
Set CapturingUnit = (Hero manipulating item)
Special Effect - Create a special effect attached to the origin of CapturingUnit using Objects\InventoryItems\BattleStandard\BattleStandard.mdl
Set FlagEffect = (Last created special effect)
Game - Display to (All players) for 15.00 seconds the text: ((Name of (Owner of (Hero manipulating item))) + has picked up the flag!)
-------- Your Actions Under Here --------

Remove the flag:

Trigger:
A Unit Loses the Flag
Collapse Events
Unit - A unit Dies
Collapse Conditions
(Dying unit) Equal to CapturingUnit
Collapse Actions
Set CapturingUnit = No unit
Special Effect - Destroy FlagEffect
Item - Create 'Your Flag Tome Item' at (Position of (Dying unit))
Game - Display to (All players) for 15.00 seconds the text: ((Name of (Owner of (Dying unit))) + has dropped the flag!)
-------- Your Actions Under Here --------
05-08-2006, 05:38 PM#6
HalfSlothNCamel
Thank you so much!!

I really appreciate you going through it all with me.