Question: event help needed

I have a second order ODE, eq, that depends on a paramter p. Certain events take place when solving the ODE and I would like to study those events as a function of p. Here is a toy version of the command that yeilds the information I need.

>dsolve({eq, f(1)=1,D(f)(1)=0},f(t), numeric, events=[  [ [f(t)-Pi,t>0],halt   ]  ,

 [  [f(t) =-1, t>0],halt]  ])(15);

When f hits  -1 or Pi the solution stops and gives me the values of t, f  and f'.
That is all well and good but I want to do this for 100 values of p and study how the stopping point and associated values of f and f' and a function H(f,f',t) depend on p. To that end I thought I might construct an array A that stores the value of p, the value of t, f and f' when the computation halts. How do I do that? I tried using a discrete variable but that is only a partial success-I don't get the values of p, f or f'.

My command:

>dsolve({eq,s(1)=0, f(1)=1,D(f)(1)=0},f(t),numeric,discrete_variables=[s(t)::float],events=[    [ [f(t)-Pi,t>0],[s(t)=H,halt]    ]  ,

 [  [f(t)=-1,t>0], [s(t)=H,halt]]])(15);

Any suggestions? Ideally I could have a do loop and an Array A[p,t,f,f',H,q] where q = 1 if the event is of type f(t)=Pi and 2 if f(t)  = -1.

Thanks for any help.

Please Wait...